﻿using System;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using DAL;
using CommontLibrary;
using System.Xml;
using System.Xml.Xsl;
using System.Globalization;
using System.Threading;
public partial class UserControl_Reports_loadReport4s : System.Web.UI.UserControl
{
    #region "Member variables"
        DALevel objLevel;
        DAQuyen objQuyen;
        DAHocVienLV2 objHocVienLV2;
        DAHocVienLV3LV5 objHocVienLV3LV5;
        DAHocVienLV6LV8 objHocVienLV6LV8;
        DAHocVien objHocVien;
        DANguoidung objNguoidung;
        DATrangThai objTrangThai;
        DATrangThaiGoi objTrangThaiGoi;
        DAReport objReport;
        DataTable dtDataReport1 = new DataTable();
        DataRow[] drReceiverTemp;
        int intTrangThaiGoi1 = 1;
        string intTrangThaiGoi2 = "2,3,4,5,6,7";
        int intTrangThaiGoi3 = 8;
        string[] strLevers = { "L1", "L2", "L3", "L4", "L5A", "L5B", "L6", "L7", "L8", "L9" };
        #region "Khai bao bien cac mon hoc,van bang"
        //QTKD
        int intVB2BA = 0;
        int intCDBA=0;
        int intKhacBA = 0;
        //Ketoan
        int intVB2FI = 0;
        int intCDFI = 0;
        int intTCKhacFI = 0;
        int intTCFI = 0;
        int intKhacFI = 0;
        //Tai chinh Ngan Hang
        int intVB2FB = 0;
        int intCDFB = 0;
        int intTCKhacFB = 0;
        int intTCFB = 0;
        int intKhacFB = 0;
        //Tin hoc
        int intVB2IT = 0;
        int intCDIT = 0;
        int intTCIT = 0;
        int intDIPIT = 0;
        int intKhacIT = 0;
        #endregion
        
        #region "Khai bao sum tong 2"
        int SumCDBA = 0;
        int SumVB2BA = 0;
        int SumKhacBA = 0;

        int SumVB2FI = 0;
        int SumCDFI = 0;
        int SumTCKhacFI = 0;
        int SumTCFI = 0;
        int SumKhacFI = 0;

        int SumVB2FB = 0;
        int SumCDFB = 0;
        int SumTCKhacFB = 0;
        int SumTCFB = 0;
        int SumKhacFB = 0;

        int SumVB2IT = 0;
        int SumCDIT = 0;
        int SumTCIT = 0;
        int SumDIPIT = 0;
        int SumKhacIT = 0;
        //int SumTotal
        int SumTotal = 0;
        #endregion
        //Tong
        int intTong = 0;
        int intTongCu = 0;

        // Phan tram Trong bang Report4s
        Decimal decPercentL5A = 0;
        Decimal decPercentL5B = 0;
        Decimal decPercentL6 = 0;
        Decimal decPercentL7 = 0;
        Decimal decPercentL8 = 0;
        Decimal decPercentL9 = 0;
       
    #endregion
    #region "Private method"
        //load Level tu L1 den L9 theo hang ngang
        public void loadLevelReport(ref string strTable)
        {
            //Lay du lieu cho trang bao cao dau                  
            DateTime dtHistDate = Convert.ToDateTime("1/1/1900");
            string strDate = "";
            if (this.ddlHistory != null && this.ddlHistory.Items.Count > 0)
            {
                strDate = this.ddlHistory.SelectedValue.ToString().Trim();
                dtHistDate = Convert.ToDateTime(strDate);
            }
            else
            {
                dtHistDate = DateTime.Now;
            }
            dtDataReport1 = new DataTable();
            dtDataReport1 = objReport.getDataFirstPageReportS4(dtHistDate);
            foreach (string strLevel in strLevers)
            {
                strTable += "\n<tr>";
                strTable += "\n<td style='background-color:#800000;color:white;font-family:Tahoma,Arial;font-weight:bold;font-size:12px;'> " + strLevel + "</td>";
                #region "L1"
                if (strLevel == "L1")
                {
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>&nbsp;</td>";
                    strTable += "\n<td style='background-color:#FFFF00;'>&nbsp;</td>";
                   
                    //Tong 2
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td style='background-color:#FFFF00;'>&nbsp;</td>";
                    strTable += "\n<td style='background-color:#FFFF00;'>&nbsp;</td>";

                    //Tong 3
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td style='background-color:#FFFF00;'>&nbsp;</td>";
                }
                #endregion
                #region "L2"
                else if (strLevel == "L2")
                {
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>&nbsp;</td>";
                    strTable += "\n<td style='background-color:#FFFF00;'>&nbsp;</td>";
                    //Tong 2
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td style='background-color:#FFFF00;'>&nbsp;</td>";
                    strTable += "\n<td style='background-color:#FFFF00;'>&nbsp;</td>";

                    //Tong 3
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td style='background-color:#FFFF00;'>&nbsp;</td>";
                }
                #endregion
                #region "L3"
                else if (strLevel == "L3")
                {
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td style='background-color:#FFFF00;'>&nbsp;</td>";
                    strTable += "\n<td style='background-color:#FFFF00;'>&nbsp;</td>";

                    //Tong2
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td style='background-color:#FFFF00;'>&nbsp;</td>";
                    strTable += "\n<td style='background-color:#FFFF00;'>&nbsp;</td>";

                    //Tong3
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td style='background-color:#FFFF00;'>&nbsp;</td>";
                }
                #endregion
                #region "L4"
                else if (strLevel == "L4")
                {
                    //Tong1
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td style='background-color:#FFFF00;'>&nbsp;</td>";
                    strTable += "\n<td style='background-color:#FFFF00;'>&nbsp;</td>";
                    //Tong2
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td style='background-color:#FFFF00;'>&nbsp;</td>";
                    strTable += "\n<td style='background-color:#FFFF00;'>&nbsp;</td>";

                    //Tong3
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td class='cssTitleReport4s'>x</td>";
                    strTable += "\n<td style='background-color:#FFFF00;'>&nbsp;</td>";
                }
                #endregion
                #region "L5A"
                else if (strLevel == "L5A")
                {
                    loadDataL5AL8(5);
                    if (dtDataReport1.Rows.Count > 0)
                    {
                        drReceiverTemp = dtDataReport1.Select("LevelID=5");
                        if (drReceiverTemp.Length > 0)
                        {
                            //Tong1
                            //QTKD
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["VB2BA"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["CDBA"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["KhacBA"].ToString() + "</td>";
                            //Ke toan
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["VB2FI"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["CDFI"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["TCKhacFI"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["TCFI"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["KhacFI"].ToString() + "</td>";
                            //Tai Chinh - Ngan hang
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["VB2FB"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["CDFB"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["TCKhacFB"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["TCFB"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["KhacFB"].ToString() + "</td>";
                            //TinHoc
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["VB2IT"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["CDIT"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["TCIT"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["DIPIT"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["KhacIT"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>" + drReceiverTemp[0]["SLT"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>" + drReceiverTemp[0]["PhanTram"].ToString() + "%</td>";

                            //Tong2
                            SumVB2BA = intVB2BA - Convert.ToInt32(drReceiverTemp[0]["VB2BA"]);
                            SumCDBA = intCDBA - Convert.ToInt32(drReceiverTemp[0]["CDBA"]);
                            SumKhacBA = intKhacBA - Convert.ToInt32(drReceiverTemp[0]["KhacBA"]);
                            //Sum Ke Toan
                            SumVB2FI = intVB2FI - Convert.ToInt32(drReceiverTemp[0]["VB2FI"]);
                            SumCDFI = intCDFI - Convert.ToInt32(drReceiverTemp[0]["CDFI"]);
                            SumTCKhacFI = intTCKhacFI - Convert.ToInt32(drReceiverTemp[0]["TCKhacFI"]);
                            SumTCFI = intTCFI - Convert.ToInt32(drReceiverTemp[0]["TCFI"]);
                            SumKhacFI = intKhacFI - Convert.ToInt32(drReceiverTemp[0]["KhacFI"]);
                            //Sum Tai chinh -Ngan hang
                            SumVB2FB = intVB2FB - Convert.ToInt32(drReceiverTemp[0]["VB2FB"]);
                            SumCDFB = intCDFB - Convert.ToInt32(drReceiverTemp[0]["CDFB"]);
                            SumTCKhacFB = intTCKhacFB - Convert.ToInt32(drReceiverTemp[0]["TCKhacFB"]);
                            SumTCFB = intTCFB - Convert.ToInt32(drReceiverTemp[0]["TCFB"]);
                            SumKhacFB = intKhacFB - Convert.ToInt32(drReceiverTemp[0]["KhacFB"]);
                            //Sum IT
                            SumVB2IT = intVB2IT - Convert.ToInt32(drReceiverTemp[0]["VB2IT"]);
                            SumCDIT = intCDIT - Convert.ToInt32(drReceiverTemp[0]["CDIT"]);
                            SumTCIT = intTCIT - Convert.ToInt32(drReceiverTemp[0]["TCIT"]);
                            SumDIPIT = intDIPIT - Convert.ToInt32(drReceiverTemp[0]["DIPIT"]);
                            SumKhacIT = intKhacIT - Convert.ToInt32(drReceiverTemp[0]["KhacIT"]);
                            //Sum Total
                            SumTotal = SumVB2BA + SumCDBA + SumKhacBA + SumVB2FI + SumCDFI + SumTCKhacFI + SumTCFI + SumKhacFI + SumVB2FB + SumCDFB + SumTCKhacFB + SumTCFB + SumKhacFB + SumVB2IT + SumCDIT + SumTCIT + SumDIPIT + SumKhacIT;
                            //QTKD
                            strTable += "\n<td class='cssTitleReport4s'>" + SumVB2BA.ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + SumCDBA.ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + SumKhacBA.ToString() + "</td>";
                            //Ke toan
                            strTable += "\n<td class='cssTitleReport4s'>" + SumVB2FI.ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + SumCDFI.ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + SumTCFI.ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + SumKhacFI.ToString() + "</td>";
                            //Tai Chinh - Ngan hang
                            strTable += "\n<td class='cssTitleReport4s'>" + SumVB2FB.ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + SumCDFB.ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + SumTCFB.ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + SumKhacFB.ToString() + "</td>";
                            //TinHoc
                            strTable += "\n<td class='cssTitleReport4s'>" + SumVB2IT.ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + SumCDIT.ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + SumTCIT.ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + SumKhacIT.ToString() + "</td>";

                            strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>" + SumTotal + "</td>";
                            intTongCu = SumTotal;
                            strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>&nbsp;</td>";
                        }
                        else
                        {
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            //Ke toan
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            //Tai Chinh - Ngan hang
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            //TinHoc
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>&nbsp;</td>";

                            //Tong2
                            //QTKD
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            //Ke toan
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            //Tai Chinh - Ngan hang
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            //TinHoc
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            //Tong va %   
                            strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>&nbsp;</td>";
                        }
                    }
                    else
                    {
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        //Ke toan
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        //Tai Chinh - Ngan hang
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        //TinHoc
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>&nbsp;</td>";

                        //Tong2
                        //QTKD
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        //Ke toan
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        //Tai Chinh - Ngan hang
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        //TinHoc
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        //Tong va %   
                        strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>&nbsp;</td>";
                    }

                    //Tong3                    
                    //QTKD
                    strTable += "\n<td class='cssTitleReport4s'>" + intVB2BA.ToString() + "</td>";
                    strTable += "\n<td class='cssTitleReport4s'>" + intCDBA.ToString() + "</td>";
                    strTable += "\n<td class='cssTitleReport4s'>" + intKhacBA.ToString() + "</td>";
                    //Ke toan
                    strTable += "\n<td class='cssTitleReport4s'>" + intVB2FI.ToString() + "</td>";
                    strTable += "\n<td class='cssTitleReport4s'>" + intCDFI.ToString() + "</td>";
                    strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                    strTable += "\n<td class='cssTitleReport4s'>" + intTCFI.ToString() + "</td>";
                    strTable += "\n<td class='cssTitleReport4s'>" + intKhacFI.ToString() + "</td>";
                    //Tai Chinh - Ngan hang
                    strTable += "\n<td class='cssTitleReport4s'>" + intVB2FB.ToString() + "</td>";
                    strTable += "\n<td class='cssTitleReport4s'>" + intCDFB.ToString() + "</td>";
                    strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                    strTable += "\n<td class='cssTitleReport4s'>" + intTCFB.ToString() + "</td>";
                    strTable += "\n<td class='cssTitleReport4s'>" + intKhacFB.ToString() + "</td>";
                    //TinHoc
                    strTable += "\n<td class='cssTitleReport4s'>" + intVB2IT.ToString() + "</td>";
                    strTable += "\n<td class='cssTitleReport4s'>" + intCDIT.ToString() + "</td>";
                    strTable += "\n<td class='cssTitleReport4s'>" + intTCIT.ToString() + "</td>";
                    strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                    strTable += "\n<td class='cssTitleReport4s'>" + intKhacIT.ToString() + "</td>";

                    strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>" + intTong + "</td>";
                }
                #endregion
                #region "L5B"
                else if (strLevel == "L5B")
                {
                    loadDataL5AL8(6);
                    if (dtDataReport1.Rows.Count > 0)
                    {
                        drReceiverTemp = dtDataReport1.Select("LevelID=6");
                        if (drReceiverTemp.Length > 0)
                        {
                            //Tong1
                            //QTKD
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["VB2BA"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["CDBA"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["KhacBA"].ToString() + "</td>";
                            //Ke toan
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["VB2FI"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["CDFI"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["TCKhacFI"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["TCFI"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["KhacFI"].ToString() + "</td>";
                            //Tai Chinh - Ngan hang
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["VB2FB"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["CDFB"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["TCKhacFB"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["TCFB"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["KhacFB"].ToString() + "</td>";
                            //TinHoc
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["VB2IT"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["CDIT"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["TCIT"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["DIPIT"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["KhacIT"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>" + drReceiverTemp[0]["SLT"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>" + drReceiverTemp[0]["PhanTram"].ToString() + "%</td>";

                            //Tong2
                            SumVB2BA = intVB2BA - Convert.ToInt32(drReceiverTemp[0]["VB2BA"]);
                            SumCDBA = intCDBA - Convert.ToInt32(drReceiverTemp[0]["CDBA"]);
                            SumKhacBA = intKhacBA - Convert.ToInt32(drReceiverTemp[0]["KhacBA"]);
                            //Sum Ke Toan
                            SumVB2FI = intVB2FI - Convert.ToInt32(drReceiverTemp[0]["VB2FI"]);
                            SumCDFI = intCDFI - Convert.ToInt32(drReceiverTemp[0]["CDFI"]);
                            SumTCKhacFI = intTCKhacFI - Convert.ToInt32(drReceiverTemp[0]["TCKhacFI"]);
                            SumTCFI = intTCFI - Convert.ToInt32(drReceiverTemp[0]["TCFI"]);
                            SumKhacFI = intKhacFI - Convert.ToInt32(drReceiverTemp[0]["KhacFI"]);
                            //Sum Tai chinh -Ngan hang
                            SumVB2FB = intVB2FB - Convert.ToInt32(drReceiverTemp[0]["VB2FB"]);
                            SumCDFB = intCDFB - Convert.ToInt32(drReceiverTemp[0]["CDFB"]);
                            SumTCKhacFB = intTCKhacFB - Convert.ToInt32(drReceiverTemp[0]["TCKhacFB"]);
                            SumTCFB = intTCFB - Convert.ToInt32(drReceiverTemp[0]["TCFB"]);
                            SumKhacFB = intKhacFB - Convert.ToInt32(drReceiverTemp[0]["KhacFB"]);
                            //Sum IT
                            SumVB2IT = intVB2IT - Convert.ToInt32(drReceiverTemp[0]["VB2IT"]);
                            SumCDIT = intCDIT - Convert.ToInt32(drReceiverTemp[0]["CDIT"]);
                            SumTCIT = intTCIT - Convert.ToInt32(drReceiverTemp[0]["TCIT"]);
                            SumDIPIT = intDIPIT - Convert.ToInt32(drReceiverTemp[0]["DIPIT"]);
                            SumKhacIT = intKhacIT - Convert.ToInt32(drReceiverTemp[0]["KhacIT"]);
                            //Sum Total
                            SumTotal = SumVB2BA + SumCDBA + SumKhacBA + SumVB2FI + SumCDFI + SumTCKhacFI + SumTCFI + SumKhacFI + SumVB2FB + SumCDFB + SumTCKhacFB + SumTCFB + SumKhacFB + SumVB2IT + SumCDIT + SumTCIT + SumDIPIT + SumKhacIT;
                            //QTKD
                            strTable += "\n<td class='cssTitleReport4s'>" + SumVB2BA.ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + SumCDBA.ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + SumKhacBA.ToString() + "</td>";
                            //Ke toan
                            strTable += "\n<td class='cssTitleReport4s'>" + SumVB2FI.ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + SumCDFI.ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + SumTCFI.ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + SumKhacFI.ToString() + "</td>";
                            //Tai Chinh - Ngan hang
                            strTable += "\n<td class='cssTitleReport4s'>" + SumVB2FB.ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + SumCDFB.ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + SumTCFB.ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + SumKhacFB.ToString() + "</td>";
                            //TinHoc
                            strTable += "\n<td class='cssTitleReport4s'>" + SumVB2IT.ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + SumCDIT.ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + SumTCIT.ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + SumKhacIT.ToString() + "</td>";
                            //Tong va %   
                            strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>" + SumTotal + "</td>";
                            if (intTongCu == 0)
                            {
                                decPercentL5B = 0;
                            }
                            else
                            {
                                decPercentL5B = Convert.ToDecimal(SumTotal * 100 / intTongCu);
                            }
                            decPercentL5B = Math.Round(decPercentL5B, 0, MidpointRounding.AwayFromZero);
                            strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>" + decPercentL5B.ToString() + "%</td>";
                            intTongCu = SumTotal;
                        }
                        else
                        {
                            //Tong 1
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            //Ke toan
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            //Tai Chinh - Ngan hang
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            //TinHoc
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>&nbsp;</td>";

                            //Tong2
                            //QTKD
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            //Ke toan
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            //Tai Chinh - Ngan hang
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            //TinHoc
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            //Tong va %   
                            strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>&nbsp;</td>";
                        }
                    }
                    else
                    {
                        //Tong 1
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        //Ke toan
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        //Tai Chinh - Ngan hang
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        //TinHoc
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>&nbsp;</td>";

                        //Tong2
                        //QTKD
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        //Ke toan
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        //Tai Chinh - Ngan hang
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        //TinHoc
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        //Tong va %   
                        strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>&nbsp;</td>";
                    }
                    //Tong3
                    //QTKD
                    strTable += "\n<td class='cssTitleReport4s'>" + intVB2BA.ToString() + "</td>";
                    strTable += "\n<td class='cssTitleReport4s'>" + intCDBA.ToString() + "</td>";
                    strTable += "\n<td class='cssTitleReport4s'>" + intKhacBA.ToString() + "</td>";
                    //Ke toan
                    strTable += "\n<td class='cssTitleReport4s'>" + intVB2FI.ToString() + "</td>";
                    strTable += "\n<td class='cssTitleReport4s'>" + intCDFI.ToString() + "</td>";
                    strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                    strTable += "\n<td class='cssTitleReport4s'>" + intTCFI.ToString() + "</td>";
                    strTable += "\n<td class='cssTitleReport4s'>" + intKhacFI.ToString() + "</td>";
                    //Tai Chinh - Ngan hang
                    strTable += "\n<td class='cssTitleReport4s'>" + intVB2FB.ToString() + "</td>";
                    strTable += "\n<td class='cssTitleReport4s'>" + intCDFB.ToString() + "</td>";
                    strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                    strTable += "\n<td class='cssTitleReport4s'>" + intTCFB.ToString() + "</td>";
                    strTable += "\n<td class='cssTitleReport4s'>" + intKhacFB.ToString() + "</td>";
                    //TinHoc
                    strTable += "\n<td class='cssTitleReport4s'>" + intVB2IT.ToString() + "</td>";
                    strTable += "\n<td class='cssTitleReport4s'>" + intCDIT.ToString() + "</td>";
                    strTable += "\n<td class='cssTitleReport4s'>" + intTCIT.ToString() + "</td>";
                    strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                    strTable += "\n<td class='cssTitleReport4s'>" + intKhacIT.ToString() + "</td>";

                    strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>" + intTong + "</td>";
                }
    #endregion
                #region "L6"
                else if (strLevel == "L6")
                {
                    loadDataL5AL8(7);
                    if (dtDataReport1.Rows.Count > 0)
                    {
                        drReceiverTemp = dtDataReport1.Select("LevelID=7");
                        if (drReceiverTemp.Length > 0)
                        {
                            //Tong1
                            //QTKD
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["VB2BA"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["CDBA"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["KhacBA"].ToString() + "</td>";
                            //Ke toan
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["VB2FI"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["CDFI"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["TCKhacFI"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["TCFI"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["KhacFI"].ToString() + "</td>";
                            //Tai Chinh - Ngan hang
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["VB2FB"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["CDFB"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["TCKhacFB"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["TCFB"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["KhacFB"].ToString() + "</td>";
                            //TinHoc
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["VB2IT"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["CDIT"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["TCIT"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["DIPIT"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["KhacIT"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>" + drReceiverTemp[0]["SLT"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>" + drReceiverTemp[0]["PhanTram"].ToString() + "%</td>";

                            //Tong2
                            SumVB2BA = intVB2BA - Convert.ToInt32(drReceiverTemp[0]["VB2BA"]);
                            SumCDBA = intCDBA - Convert.ToInt32(drReceiverTemp[0]["CDBA"]);
                            SumKhacBA = intKhacBA - Convert.ToInt32(drReceiverTemp[0]["KhacBA"]);
                            //Sum Ke Toan
                            SumVB2FI = intVB2FI - Convert.ToInt32(drReceiverTemp[0]["VB2FI"]);
                            SumCDFI = intCDFI - Convert.ToInt32(drReceiverTemp[0]["CDFI"]);
                            SumTCKhacFI = intTCKhacFI - Convert.ToInt32(drReceiverTemp[0]["TCKhacFI"]);
                            SumTCFI = intTCFI - Convert.ToInt32(drReceiverTemp[0]["TCFI"]);
                            SumKhacFI = intKhacFI - Convert.ToInt32(drReceiverTemp[0]["KhacFI"]);
                            //Sum Tai chinh -Ngan hang
                            SumVB2FB = intVB2FB - Convert.ToInt32(drReceiverTemp[0]["VB2FB"]);
                            SumCDFB = intCDFB - Convert.ToInt32(drReceiverTemp[0]["CDFB"]);
                            SumTCKhacFB = intTCKhacFB - Convert.ToInt32(drReceiverTemp[0]["TCKhacFB"]);
                            SumTCFB = intTCFB - Convert.ToInt32(drReceiverTemp[0]["TCFB"]);
                            SumKhacFB = intKhacFB - Convert.ToInt32(drReceiverTemp[0]["KhacFB"]);
                            //Sum IT
                            SumVB2IT = intVB2IT - Convert.ToInt32(drReceiverTemp[0]["VB2IT"]);
                            SumCDIT = intCDIT - Convert.ToInt32(drReceiverTemp[0]["CDIT"]);
                            SumTCIT = intTCIT - Convert.ToInt32(drReceiverTemp[0]["TCIT"]);
                            SumDIPIT = intDIPIT - Convert.ToInt32(drReceiverTemp[0]["DIPIT"]);
                            SumKhacIT = intKhacIT - Convert.ToInt32(drReceiverTemp[0]["KhacIT"]);
                            //Sum Total
                            SumTotal = SumVB2BA + SumCDBA + SumKhacBA + SumVB2FI + SumCDFI + SumTCKhacFI + SumTCFI + SumKhacFI + SumVB2FB + SumCDFB + SumTCKhacFB + SumTCFB + SumKhacFB + SumVB2IT + SumCDIT + SumTCIT + SumDIPIT + SumKhacIT;
                            //QTKD
                            strTable += "\n<td class='cssTitleReport4s'>" + SumVB2BA.ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + SumCDBA.ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + SumKhacBA.ToString() + "</td>";
                            //Ke toan
                            strTable += "\n<td class='cssTitleReport4s'>" + SumVB2FI.ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + SumCDFI.ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + SumTCFI.ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + SumKhacFI.ToString() + "</td>";
                            //Tai Chinh - Ngan hang
                            strTable += "\n<td class='cssTitleReport4s'>" + SumVB2FB.ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + SumCDFB.ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + SumTCFB.ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + SumKhacFB.ToString() + "</td>";
                            //TinHoc
                            strTable += "\n<td class='cssTitleReport4s'>" + SumVB2IT.ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + SumCDIT.ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + SumTCIT.ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + SumKhacIT.ToString() + "</td>";
                            //Tong va %   
                            strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>" + SumTotal + "</td>";
                            if (intTongCu == 0)
                            {
                                decPercentL6 = 0;
                            }
                            else
                            {
                                decPercentL6 = Convert.ToDecimal(SumTotal * 100 / intTongCu);
                            }
                            decPercentL5B = Math.Round(decPercentL6, 0, MidpointRounding.AwayFromZero);
                            strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>" + decPercentL6.ToString() + "%</td>";
                            intTongCu = SumTotal;
                        }
                        else
                        {
                            //Tong 1
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            //Ke toan
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            //Tai Chinh - Ngan hang
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            //TinHoc
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>&nbsp;</td>";

                            //Tong2
                            //QTKD
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            //Ke toan
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            //Tai Chinh - Ngan hang
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            //TinHoc
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            //Tong va %   
                            strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>&nbsp;</td>";
                        }
                    }
                    else
                    {
                        //Tong 1
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        //Ke toan
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        //Tai Chinh - Ngan hang
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        //TinHoc
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>&nbsp;</td>";

                        //Tong2
                        //QTKD
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        //Ke toan
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        //Tai Chinh - Ngan hang
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        //TinHoc
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        //Tong va %   
                        strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>&nbsp;</td>";
                    }

                    //Tong3
                    //QTKD
                    strTable += "\n<td class='cssTitleReport4s'>" + intVB2BA.ToString() + "</td>";
                    strTable += "\n<td class='cssTitleReport4s'>" + intCDBA.ToString() + "</td>";
                    strTable += "\n<td class='cssTitleReport4s'>" + intKhacBA.ToString() + "</td>";
                    //Ke toan
                    strTable += "\n<td class='cssTitleReport4s'>" + intVB2FI.ToString() + "</td>";
                    strTable += "\n<td class='cssTitleReport4s'>" + intCDFI.ToString() + "</td>";
                    strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                    strTable += "\n<td class='cssTitleReport4s'>" + intTCFI.ToString() + "</td>";
                    strTable += "\n<td class='cssTitleReport4s'>" + intKhacFI.ToString() + "</td>";
                    //Tai Chinh - Ngan hang
                    strTable += "\n<td class='cssTitleReport4s'>" + intVB2FB.ToString() + "</td>";
                    strTable += "\n<td class='cssTitleReport4s'>" + intCDFB.ToString() + "</td>";
                    strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                    strTable += "\n<td class='cssTitleReport4s'>" + intTCFB.ToString() + "</td>";
                    strTable += "\n<td class='cssTitleReport4s'>" + intKhacFB.ToString() + "</td>";
                    //TinHoc
                    strTable += "\n<td class='cssTitleReport4s'>" + intVB2IT.ToString() + "</td>";
                    strTable += "\n<td class='cssTitleReport4s'>" + intCDIT.ToString() + "</td>";
                    strTable += "\n<td class='cssTitleReport4s'>" + intTCIT.ToString() + "</td>";
                    strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                    strTable += "\n<td class='cssTitleReport4s'>" + intKhacIT.ToString() + "</td>";

                    strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>" + intTong + "</td>";
                    intTongCu = intTong;
                }
                #endregion
                #region "L7"
                else if (strLevel == "L7")
                {
                    loadDataL5AL8(8);
                    if (dtDataReport1.Rows.Count > 0)
                    {
                        drReceiverTemp = dtDataReport1.Select("LevelID=8");
                        if (drReceiverTemp.Length > 0)
                        {
                            //Tong1
                            //QTKD
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["VB2BA"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["CDBA"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["KhacBA"].ToString() + "</td>";
                            //Ke toan
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["VB2FI"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["CDFI"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["TCKhacFI"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["TCFI"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["KhacFI"].ToString() + "</td>";
                            //Tai Chinh - Ngan hang
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["VB2FB"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["CDFB"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["TCKhacFB"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["TCFB"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["KhacFB"].ToString() + "</td>";
                            //TinHoc
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["VB2IT"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["CDIT"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["TCIT"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["DIPIT"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["KhacIT"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>" + drReceiverTemp[0]["SLT"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>" + drReceiverTemp[0]["PhanTram"].ToString() + "%</td>";

                            //Tong2
                            SumVB2BA = intVB2BA - Convert.ToInt32(drReceiverTemp[0]["VB2BA"]);
                            SumCDBA = intCDBA - Convert.ToInt32(drReceiverTemp[0]["CDBA"]);
                            SumKhacBA = intKhacBA - Convert.ToInt32(drReceiverTemp[0]["KhacBA"]);
                            //Sum Ke Toan
                            SumVB2FI = intVB2FI - Convert.ToInt32(drReceiverTemp[0]["VB2FI"]);
                            SumCDFI = intCDFI - Convert.ToInt32(drReceiverTemp[0]["CDFI"]);
                            SumTCKhacFI = intTCKhacFI - Convert.ToInt32(drReceiverTemp[0]["TCKhacFI"]);
                            SumTCFI = intTCFI - Convert.ToInt32(drReceiverTemp[0]["TCFI"]);
                            SumKhacFI = intKhacFI - Convert.ToInt32(drReceiverTemp[0]["KhacFI"]);
                            //Sum Tai chinh -Ngan hang
                            SumVB2FB = intVB2FB - Convert.ToInt32(drReceiverTemp[0]["VB2FB"]);
                            SumCDFB = intCDFB - Convert.ToInt32(drReceiverTemp[0]["CDFB"]);
                            SumTCKhacFB = intTCKhacFB - Convert.ToInt32(drReceiverTemp[0]["TCKhacFB"]);
                            SumTCFB = intTCFB - Convert.ToInt32(drReceiverTemp[0]["TCFB"]);
                            SumKhacFB = intKhacFB - Convert.ToInt32(drReceiverTemp[0]["KhacFB"]);
                            //Sum IT
                            SumVB2IT = intVB2IT - Convert.ToInt32(drReceiverTemp[0]["VB2IT"]);
                            SumCDIT = intCDIT - Convert.ToInt32(drReceiverTemp[0]["CDIT"]);
                            SumTCIT = intTCIT - Convert.ToInt32(drReceiverTemp[0]["TCIT"]);
                            SumDIPIT = intDIPIT - Convert.ToInt32(drReceiverTemp[0]["DIPIT"]);
                            SumKhacIT = intKhacIT - Convert.ToInt32(drReceiverTemp[0]["KhacIT"]);
                            //Sum Total
                            SumTotal = SumVB2BA + SumCDBA + SumKhacBA + SumVB2FI + SumCDFI + SumTCKhacFI + SumTCFI + SumKhacFI + SumVB2FB + SumCDFB + SumTCKhacFB + SumTCFB + SumKhacFB + SumVB2IT + SumCDIT + SumTCIT + SumDIPIT + SumKhacIT;
                            //QTKD
                            strTable += "\n<td class='cssTitleReport4s'>" + SumVB2BA.ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + SumCDBA.ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + SumKhacBA.ToString() + "</td>";
                            //Ke toan
                            strTable += "\n<td class='cssTitleReport4s'>" + SumVB2FI.ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + SumCDFI.ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + SumTCFI.ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + SumKhacFI.ToString() + "</td>";
                            //Tai Chinh - Ngan hang
                            strTable += "\n<td class='cssTitleReport4s'>" + SumVB2FB.ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + SumCDFB.ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + SumTCFB.ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + SumKhacFB.ToString() + "</td>";
                            //TinHoc
                            strTable += "\n<td class='cssTitleReport4s'>" + SumVB2IT.ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + SumCDIT.ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + SumTCIT.ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + SumKhacIT.ToString() + "</td>";
                            //Tong va %   
                            strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>" + SumTotal + "</td>";
                            if (intTongCu == 0)
                            {
                                decPercentL7 = 0;
                            }
                            else
                            {
                                decPercentL7 = Convert.ToDecimal(SumTotal * 100 / intTongCu);
                            }
                            decPercentL5B = Math.Round(decPercentL7, 0, MidpointRounding.AwayFromZero);
                            strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>" + decPercentL7.ToString() + "%</td>";
                            intTongCu = SumTotal;
                        }
                        else
                        {
                            //Tong 1
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            //Ke toan
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            //Tai Chinh - Ngan hang
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            //TinHoc
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>&nbsp;</td>";

                            //Tong2
                            //QTKD
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            //Ke toan
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            //Tai Chinh - Ngan hang
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            //TinHoc
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            //Tong va %   
                            strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>&nbsp;</td>";
                        }
                    }
                    else
                    {
                        //Tong 1
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        //Ke toan
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        //Tai Chinh - Ngan hang
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        //TinHoc
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>&nbsp;</td>";

                        //Tong2
                        //QTKD
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        //Ke toan
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        //Tai Chinh - Ngan hang
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        //TinHoc
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        //Tong va %   
                        strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>&nbsp;</td>";
                    }

                    //Tong3
                    //QTKD
                    strTable += "\n<td class='cssTitleReport4s'>" + intVB2BA.ToString() + "</td>";
                    strTable += "\n<td class='cssTitleReport4s'>" + intCDBA.ToString() + "</td>";
                    strTable += "\n<td class='cssTitleReport4s'>" + intKhacBA.ToString() + "</td>";
                    //Ke toan
                    strTable += "\n<td class='cssTitleReport4s'>" + intVB2FI.ToString() + "</td>";
                    strTable += "\n<td class='cssTitleReport4s'>" + intCDFI.ToString() + "</td>";
                    strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                    strTable += "\n<td class='cssTitleReport4s'>" + intTCFI.ToString() + "</td>";
                    strTable += "\n<td class='cssTitleReport4s'>" + intKhacFI.ToString() + "</td>";
                    //Tai Chinh - Ngan hang
                    strTable += "\n<td class='cssTitleReport4s'>" + intVB2FB.ToString() + "</td>";
                    strTable += "\n<td class='cssTitleReport4s'>" + intCDFB.ToString() + "</td>";
                    strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                    strTable += "\n<td class='cssTitleReport4s'>" + intTCFB.ToString() + "</td>";
                    strTable += "\n<td class='cssTitleReport4s'>" + intKhacFB.ToString() + "</td>";
                    //TinHoc
                    strTable += "\n<td class='cssTitleReport4s'>" + intVB2IT.ToString() + "</td>";
                    strTable += "\n<td class='cssTitleReport4s'>" + intCDIT.ToString() + "</td>";
                    strTable += "\n<td class='cssTitleReport4s'>" + intTCIT.ToString() + "</td>";
                    strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                    strTable += "\n<td class='cssTitleReport4s'>" + intKhacIT.ToString() + "</td>";

                    strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>" + intTong + "</td>";
                    intTongCu = intTong;
                }
                #endregion
                #region "L8"
                else if (strLevel == "L8")
                {
                    loadDataL5AL8(9);
                    if (dtDataReport1.Rows.Count > 0)
                    {
                        drReceiverTemp = dtDataReport1.Select("LevelID=9");
                        if (drReceiverTemp.Length > 0)
                        {
                            //Tong1
                            //QTKD
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["VB2BA"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["CDBA"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["KhacBA"].ToString() + "</td>";
                            //Ke toan
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["VB2FI"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["CDFI"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["TCKhacFI"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["TCFI"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["KhacFI"].ToString() + "</td>";
                            //Tai Chinh - Ngan hang
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["VB2FB"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["CDFB"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["TCKhacFB"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["TCFB"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["KhacFB"].ToString() + "</td>";
                            //TinHoc
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["VB2IT"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["CDIT"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["TCIT"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["DIPIT"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["KhacIT"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>" + drReceiverTemp[0]["SLT"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>" + drReceiverTemp[0]["PhanTram"].ToString() + "%</td>";

                            //Tong2
                            SumVB2BA = intVB2BA - Convert.ToInt32(drReceiverTemp[0]["VB2BA"]);
                            SumCDBA = intCDBA - Convert.ToInt32(drReceiverTemp[0]["CDBA"]);
                            SumKhacBA = intKhacBA - Convert.ToInt32(drReceiverTemp[0]["KhacBA"]);
                            //Sum Ke Toan
                            SumVB2FI = intVB2FI - Convert.ToInt32(drReceiverTemp[0]["VB2FI"]);
                            SumCDFI = intCDFI - Convert.ToInt32(drReceiverTemp[0]["CDFI"]);
                            SumTCKhacFI = intTCKhacFI - Convert.ToInt32(drReceiverTemp[0]["TCKhacFI"]);
                            SumTCFI = intTCFI - Convert.ToInt32(drReceiverTemp[0]["TCFI"]);
                            SumKhacFI = intKhacFI - Convert.ToInt32(drReceiverTemp[0]["KhacFI"]);
                            //Sum Tai chinh -Ngan hang
                            SumVB2FB = intVB2FB - Convert.ToInt32(drReceiverTemp[0]["VB2FB"]);
                            SumCDFB = intCDFB - Convert.ToInt32(drReceiverTemp[0]["CDFB"]);
                            SumTCKhacFB = intTCKhacFB - Convert.ToInt32(drReceiverTemp[0]["TCKhacFB"]);
                            SumTCFB = intTCFB - Convert.ToInt32(drReceiverTemp[0]["TCFB"]);
                            SumKhacFB = intKhacFB - Convert.ToInt32(drReceiverTemp[0]["KhacFB"]);
                            //Sum IT
                            SumVB2IT = intVB2IT - Convert.ToInt32(drReceiverTemp[0]["VB2IT"]);
                            SumCDIT = intCDIT - Convert.ToInt32(drReceiverTemp[0]["CDIT"]);
                            SumTCIT = intTCIT - Convert.ToInt32(drReceiverTemp[0]["TCIT"]);
                            SumDIPIT = intDIPIT - Convert.ToInt32(drReceiverTemp[0]["DIPIT"]);
                            SumKhacIT = intKhacIT - Convert.ToInt32(drReceiverTemp[0]["KhacIT"]);
                            //Sum Total
                            SumTotal = SumVB2BA + SumCDBA + SumKhacBA + SumVB2FI + SumCDFI + SumTCKhacFI + SumTCFI + SumKhacFI + SumVB2FB + SumCDFB + SumTCKhacFB + SumTCFB + SumKhacFB + SumVB2IT + SumCDIT + SumTCIT + SumDIPIT + SumKhacIT;
                            //QTKD
                            strTable += "\n<td class='cssTitleReport4s'>" + SumVB2BA.ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + SumCDBA.ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + SumKhacBA.ToString() + "</td>";
                            //Ke toan
                            strTable += "\n<td class='cssTitleReport4s'>" + SumVB2FI.ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + SumCDFI.ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + SumTCFI.ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + SumKhacFI.ToString() + "</td>";
                            //Tai Chinh - Ngan hang
                            strTable += "\n<td class='cssTitleReport4s'>" + SumVB2FB.ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + SumCDFB.ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + SumTCFB.ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + SumKhacFB.ToString() + "</td>";
                            //TinHoc
                            strTable += "\n<td class='cssTitleReport4s'>" + SumVB2IT.ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + SumCDIT.ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + SumTCIT.ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + SumKhacIT.ToString() + "</td>";
                            //Tong va %   
                            strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>" + SumTotal + "</td>";
                            if (intTongCu == 0)
                            {
                                decPercentL8 = 0;
                            }
                            else
                            {
                                decPercentL8 = Convert.ToDecimal(SumTotal * 100 / intTongCu);
                            }
                            decPercentL5B = Math.Round(decPercentL8, 0, MidpointRounding.AwayFromZero);
                            strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>" + decPercentL8.ToString() + "%</td>";
                            intTongCu = SumTotal;
                        }
                        else
                        {
                            //Tong 1
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            //Ke toan
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            //Tai Chinh - Ngan hang
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            //TinHoc
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>&nbsp;</td>";

                            //Tong2
                            //QTKD
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            //Ke toan
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            //Tai Chinh - Ngan hang
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            //TinHoc
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            //Tong va %   
                            strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>&nbsp;</td>";
                        }
                    }
                    else
                    {
                        //Tong 1
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        //Ke toan
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        //Tai Chinh - Ngan hang
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        //TinHoc
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>&nbsp;</td>";

                        //Tong2
                        //QTKD
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        //Ke toan
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        //Tai Chinh - Ngan hang
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        //TinHoc
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        //Tong va %   
                        strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>&nbsp;</td>";
                    }

                    //Tong3
                    //QTKD
                    strTable += "\n<td class='cssTitleReport4s'>" + intVB2BA.ToString() + "</td>";
                    strTable += "\n<td class='cssTitleReport4s'>" + intCDBA.ToString() + "</td>";
                    strTable += "\n<td class='cssTitleReport4s'>" + intKhacBA.ToString() + "</td>";
                    //Ke toan
                    strTable += "\n<td class='cssTitleReport4s'>" + intVB2FI.ToString() + "</td>";
                    strTable += "\n<td class='cssTitleReport4s'>" + intCDFI.ToString() + "</td>";
                    strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                    strTable += "\n<td class='cssTitleReport4s'>" + intTCFI.ToString() + "</td>";
                    strTable += "\n<td class='cssTitleReport4s'>" + intKhacFI.ToString() + "</td>";
                    //Tai Chinh - Ngan hang
                    strTable += "\n<td class='cssTitleReport4s'>" + intVB2FB.ToString() + "</td>";
                    strTable += "\n<td class='cssTitleReport4s'>" + intCDFB.ToString() + "</td>";
                    strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                    strTable += "\n<td class='cssTitleReport4s'>" + intTCFB.ToString() + "</td>";
                    strTable += "\n<td class='cssTitleReport4s'>" + intKhacFB.ToString() + "</td>";
                    //TinHoc
                    strTable += "\n<td class='cssTitleReport4s'>" + intVB2IT.ToString() + "</td>";
                    strTable += "\n<td class='cssTitleReport4s'>" + intCDIT.ToString() + "</td>";
                    strTable += "\n<td class='cssTitleReport4s'>" + intTCIT.ToString() + "</td>";
                    strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                    strTable += "\n<td class='cssTitleReport4s'>" + intKhacIT.ToString() + "</td>";

                    strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>" + intTong + "</td>";
                    intTongCu = intTong;
                }
                #endregion
                #region "L9"
                else if (strLevel == "L9")
                {
                    loadDataL5AL8(10);
                    if (dtDataReport1.Rows.Count > 0)
                    {
                        drReceiverTemp = dtDataReport1.Select("LevelID=10");
                        if (drReceiverTemp.Length > 0)
                        {
                            //Tong1
                            //QTKD
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["VB2BA"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["CDBA"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["KhacBA"].ToString() + "</td>";
                            //Ke toan
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["VB2FI"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["CDFI"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["TCKhacFI"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["TCFI"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["KhacFI"].ToString() + "</td>";
                            //Tai Chinh - Ngan hang
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["VB2FB"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["CDFB"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["TCKhacFB"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["TCFB"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["KhacFB"].ToString() + "</td>";
                            //TinHoc
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["VB2IT"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["CDIT"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["TCIT"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["DIPIT"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + drReceiverTemp[0]["KhacIT"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>" + drReceiverTemp[0]["SLT"].ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>" + drReceiverTemp[0]["PhanTram"].ToString() + "%</td>";

                            //Tong2
                            SumVB2BA = intVB2BA - Convert.ToInt32(drReceiverTemp[0]["VB2BA"]);
                            SumCDBA = intCDBA - Convert.ToInt32(drReceiverTemp[0]["CDBA"]);
                            SumKhacBA = intKhacBA - Convert.ToInt32(drReceiverTemp[0]["KhacBA"]);
                            //Sum Ke Toan
                            SumVB2FI = intVB2FI - Convert.ToInt32(drReceiverTemp[0]["VB2FI"]);
                            SumCDFI = intCDFI - Convert.ToInt32(drReceiverTemp[0]["CDFI"]);
                            SumTCKhacFI = intTCKhacFI - Convert.ToInt32(drReceiverTemp[0]["TCKhacFI"]);
                            SumTCFI = intTCFI - Convert.ToInt32(drReceiverTemp[0]["TCFI"]);
                            SumKhacFI = intKhacFI - Convert.ToInt32(drReceiverTemp[0]["KhacFI"]);
                            //Sum Tai chinh -Ngan hang
                            SumVB2FB = intVB2FB - Convert.ToInt32(drReceiverTemp[0]["VB2FB"]);
                            SumCDFB = intCDFB - Convert.ToInt32(drReceiverTemp[0]["CDFB"]);
                            SumTCKhacFB = intTCKhacFB - Convert.ToInt32(drReceiverTemp[0]["TCKhacFB"]);
                            SumTCFB = intTCFB - Convert.ToInt32(drReceiverTemp[0]["TCFB"]);
                            SumKhacFB = intKhacFB - Convert.ToInt32(drReceiverTemp[0]["KhacFB"]);
                            //Sum IT
                            SumVB2IT = intVB2IT - Convert.ToInt32(drReceiverTemp[0]["VB2IT"]);
                            SumCDIT = intCDIT - Convert.ToInt32(drReceiverTemp[0]["CDIT"]);
                            SumTCIT = intTCIT - Convert.ToInt32(drReceiverTemp[0]["TCIT"]);
                            SumDIPIT = intDIPIT - Convert.ToInt32(drReceiverTemp[0]["DIPIT"]);
                            SumKhacIT = intKhacIT - Convert.ToInt32(drReceiverTemp[0]["KhacIT"]);
                            //Sum Total
                            SumTotal = SumVB2BA + SumCDBA + SumKhacBA + SumVB2FI + SumCDFI + SumTCKhacFI + SumTCFI + SumKhacFI + SumVB2FB + SumCDFB + SumTCKhacFB + SumTCFB + SumKhacFB + SumVB2IT + SumCDIT + SumTCIT + SumDIPIT + SumKhacIT;
                            //QTKD
                            strTable += "\n<td class='cssTitleReport4s'>" + SumVB2BA.ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + SumCDBA.ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + SumKhacBA.ToString() + "</td>";
                            //Ke toan
                            strTable += "\n<td class='cssTitleReport4s'>" + SumVB2FI.ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + SumCDFI.ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + SumTCFI.ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + SumKhacFI.ToString() + "</td>";
                            //Tai Chinh - Ngan hang
                            strTable += "\n<td class='cssTitleReport4s'>" + SumVB2FB.ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + SumCDFB.ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + SumTCFB.ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + SumKhacFB.ToString() + "</td>";
                            //TinHoc
                            strTable += "\n<td class='cssTitleReport4s'>" + SumVB2IT.ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + SumCDIT.ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + SumTCIT.ToString() + "</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>" + SumKhacIT.ToString() + "</td>";
                            //Tong va %   
                            strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>" + SumTotal + "</td>";
                            if (intTongCu == 0)
                            {
                                decPercentL9 = 0;
                            }
                            else
                            {
                                decPercentL9 = Convert.ToDecimal(SumTotal * 100 / intTongCu);
                            }
                            decPercentL5B = Math.Round(decPercentL9, 0, MidpointRounding.AwayFromZero);
                            strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>" + decPercentL9.ToString() + "%</td>";
                            intTongCu = SumTotal;
                        }
                        else
                        {
                            //Tong 1
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            //Ke toan
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            //Tai Chinh - Ngan hang
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            //TinHoc
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>&nbsp;</td>";

                            //Tong2
                            //QTKD
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            //Ke toan
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            //Tai Chinh - Ngan hang
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            //TinHoc
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                            //Tong va %   
                            strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>&nbsp;</td>";
                            strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>&nbsp;</td>";
                        }
                        
                    }
                    else
                    {
                        //Tong 1
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        //Ke toan
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        //Tai Chinh - Ngan hang
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        //TinHoc
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>&nbsp;</td>";

                        //Tong2
                        //QTKD
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        //Ke toan
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        //Tai Chinh - Ngan hang
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        //TinHoc
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                        //Tong va %   
                        strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>&nbsp;</td>";
                        strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>&nbsp;</td>";
                    }

                    //Tong3
                    strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                    strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                    strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                    //Ke toan
                    strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                    strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                    strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                    strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                    strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                    //Tai Chinh - Ngan hang
                    strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                    strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                    strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                    strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                    strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                    strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                    strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                    strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                    strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                    strTable += "\n<td class='cssTitleReport4s'>&nbsp;</td>";
                    strTable += "\n<td class='cssTitleReport4s' style='background-color:#FFFF00;'>&nbsp;</td>";
                }
                #endregion
                strTable += "\n</tr>";
            }
        }
       //Load Data
        public void loadDataL5AL8( int LevelID)
        {
            //DataTable dtDataReportL5B = objReport.loadLV5A8(6);
            //DataTable dtDataReportL6 = objReport.loadLV5A8(7);
            //DataTable dtDataReportL7 = objReport.loadLV5A8(8);
            //DataTable dtDataReportL8 = objReport.loadLV5A8(9);
            //QTKD
            DataTable dtDataReportL5A = objReport.loadLV5A8(LevelID);
            if (dtDataReportL5A.Rows.Count > 0)
            {
                intVB2BA = Convert.ToInt32(dtDataReportL5A.Rows[0]["DaiHocBA"].ToString());
                intCDBA = Convert.ToInt32(dtDataReportL5A.Rows[0]["CaoDangBA"].ToString());
                intKhacBA = Convert.ToInt32(dtDataReportL5A.Rows[0]["KhacBA"].ToString());

                //Ketoan
                intVB2FI = Convert.ToInt32(dtDataReportL5A.Rows[0]["DaiHocFI"].ToString());
                intCDFI = Convert.ToInt32(dtDataReportL5A.Rows[0]["CaoDangFI"].ToString());
                intTCFI = Convert.ToInt32(dtDataReportL5A.Rows[0]["TrungCapFI"].ToString());
                intKhacFI = Convert.ToInt32(dtDataReportL5A.Rows[0]["KhacFI"].ToString());
                //Tai Chinh Ngan Hang
                intVB2FB = Convert.ToInt32(dtDataReportL5A.Rows[0]["DaiHocFB"].ToString());
                intCDFB = Convert.ToInt32(dtDataReportL5A.Rows[0]["CaoDangFB"].ToString());
                intTCFB = Convert.ToInt32(dtDataReportL5A.Rows[0]["TrungCapFB"].ToString());
                intKhacFB = Convert.ToInt32(dtDataReportL5A.Rows[0]["KhacFB"].ToString());
                //Tin Hoc
                intVB2IT = Convert.ToInt32(dtDataReportL5A.Rows[0]["DaiHocIT"].ToString());
                intCDIT = Convert.ToInt32(dtDataReportL5A.Rows[0]["CaoDangIT"].ToString());
                intTCIT = Convert.ToInt32(dtDataReportL5A.Rows[0]["TrungCapIT"].ToString());
                intKhacIT = Convert.ToInt32(dtDataReportL5A.Rows[0]["KhacIT"].ToString());
                intTong=intVB2BA+intCDBA+intKhacBA+intVB2FI+intCDFI+intTCFI+intKhacFI+intVB2FB+intCDFB+intTCFB+intKhacFB+intVB2IT+intCDIT+intTCIT+intKhacIT;
                //if (LevelID == 6)
                //{
                //    decPercentReportLx1L2 = (Decimal)(intTong * 100 / intTotalFinishLx1L2);
                //    decPercentReportLx1L2 = Math.Round(decPercentReportLx1L2, 0, MidpointRounding.AwayFromZero);
                //}
            }
        }
        //load ca 3 bang
        private void loadReport4s()
        {
            this.lblMess.Text = "";
            if (this.ddlHistory.Items.Count > 0)
            {
                DateTime dtHistDate;
                string strDate = "";
                try
                {
                    strDate = this.ddlHistory.SelectedValue.ToString().Trim();
                    dtHistDate = Convert.ToDateTime(strDate);
                    strDate = dtHistDate.ToString("dd/MM/yyyy").Trim();
                }
                catch
                {
                    strDate = this.ddlHistory.SelectedItem.Text.ToString().Trim();
                    dtHistDate = Convert.ToDateTime(strDate);
                }
                DataTable dtDataReport2 = objReport.getDataFirstPageReportS4(dtHistDate);
                string strStarDate = txtDate.SelectedDate.ToString("dd/MM/yyyy").Trim();
                string strTable = "<table border='1' cellpadding='0' cellspacing='0' align='left' style='width:100%;'>";
                #region "Tieu de"
                strTable += "\n<tr>";
                strTable += "\n<td style='background-color:#800000;color:white;'> &nbsp;</td>";
                //Tong 1
                strTable += "\n<td colspan='18' style='background-color:#C0C0C0;' class='cssReport4sTitle1'>Còn tồn từ trước</td>";
                strTable += "\n<td class='cssReport4sTitle1'>Tổng</td>";
                strTable += "\n<td class='cssReport4sTitle1'>%</td>";
                //Tong 2
                strTable += "\n<td colspan='18' style='background-color:#C0C0C0;' class='cssReport4sTitle1'>Số lượng thi đợt này</td>";
                strTable += "\n<td class='cssReport4sTitle1'>Tổng</td>";
                strTable += "\n<td class='cssReport4sTitle1'>%</td>";
                //Tong 3
                strTable += "\n<td colspan='18' style='background-color:#C0C0C0;' class='cssReport4sTitle1'>Số liệu khai giảng (từ:" + strDate + " đến:" + strStarDate + ")</td>";
                strTable += "\n<td class='cssReport4sTitle1'>Tổng</td>";
                strTable += "\n</tr>";
                #endregion
                #region "Tieu de 2"
                strTable += "\n<tr>";
                strTable += "\n<td style='background-color:#800000;color:white;'>&nbsp;</td>";
                //Tong 1
                strTable += "\n<td colspan='3' class='cssReport4sTitle1'>BA (QTKD)</td>";
                strTable += "\n<td colspan='5' class='cssReport4sTitle1'>FI (Ke toan)</td>";
                strTable += "\n<td colspan='5' class='cssReport4sTitle1'>FB (tai chinh - NH)</td>";
                strTable += "\n<td colspan='5' class='cssReport4sTitle1'>IT (KS Tin hoc)</td>";
                strTable += "\n<td style='background-color:#FFFF00;'>&nbsp;</td>";
                strTable += "\n<td style='background-color:#FFFF00;'>&nbsp;</td>";
                //Tong 2
                strTable += "\n<td colspan='3' class='cssReport4sTitle1'>BA (QTKD)</td>";
                strTable += "\n<td colspan='5' class='cssReport4sTitle1'>FI (Ke toan)</td>";
                strTable += "\n<td colspan='5' class='cssReport4sTitle1'>FB (tai chinh - NH)</td>";
                strTable += "\n<td colspan='5' class='cssReport4sTitle1'>IT (KS Tin hoc)</td>";
                strTable += "\n<td style='background-color:#FFFF00;'>&nbsp;</td>";
                strTable += "\n<td style='background-color:#FFFF00;'>&nbsp;</td>";
                //Tong 3
                strTable += "\n<td colspan='3' class='cssReport4sTitle1'>BA (QTKD)</td>";
                strTable += "\n<td colspan='5' class='cssReport4sTitle1'>FI (Ke toan)</td>";
                strTable += "\n<td colspan='5' class='cssReport4sTitle1'>FB (tai chinh - NH)</td>";
                strTable += "\n<td colspan='5' class='cssReport4sTitle1'>IT (KS Tin hoc)</td>";
                strTable += "\n<td style='background-color:#FFFF00;'>&nbsp;</td>";
                strTable += "\n</tr>";
                #endregion
                #region "Tieu de 3"
                strTable += "\n<tr>";
                strTable += "\n<td style='background-color:#800000;color:white;'>&nbsp;</td>";
                //Tong 1
                strTable += "\n<td  width='20%' class='cssReport4sTitle2'>VB2</td>";
                strTable += "\n<td class='cssReport4sTitle2'>CĐ</td>";
                strTable += "\n<td class='cssReport4sTitle2'>0+</td>";
                //Ke toan
                strTable += "\n<td class='cssReport4sTitle2'>VB2</td>";
                strTable += "\n<td class='cssReport4sTitle2'>CĐ</td>";
                strTable += "\n<td class='cssReport4sTitle2'>TC#</td>";
                strTable += "\n<td class='cssReport4sTitle2'>TC</td>";
                strTable += "\n<td class='cssReport4sTitle2'>0+</td>";
                //TC-Ngan Hang
                strTable += "\n<td  class='cssReport4sTitle2'>VB2</td>";
                strTable += "\n<td  class='cssReport4sTitle2'>CĐ</td>";
                strTable += "\n<td  class='cssReport4sTitle2'>TC#</td>";
                strTable += "\n<td  class='cssReport4sTitle2'>TC</td>";
                strTable += "\n<td  class='cssReport4sTitle2'>0+</td>";
                //IT
                strTable += "\n<td  class='cssReport4sTitle2'>VB2</td>";
                strTable += "\n<td  class='cssReport4sTitle2'>CĐ</td>";
                strTable += "\n<td  class='cssReport4sTitle2'>TC</td>";
                strTable += "\n<td  class='cssReport4sTitle2'>DIP</td>";
                strTable += "\n<td  class='cssReport4sTitle2'>0+</td>";
                strTable += "\n<td style='background-color:#FFFF00;'>&nbsp;</td>";
                strTable += "\n<td style='background-color:#FFFF00;'>&nbsp;</td>";

                //Tong 2
                strTable += "\n<td  class='cssReport4sTitle2'>VB2</td>";
                strTable += "\n<td  class='cssReport4sTitle2'>CĐ</td>";
                strTable += "\n<td  class='cssReport4sTitle2'>0+</td>";
                //Ke toan
                strTable += "\n<td  class='cssReport4sTitle2'>VB2</td>";
                strTable += "\n<td  class='cssReport4sTitle2'>CĐ</td>";
                strTable += "\n<td  class='cssReport4sTitle2'>TC#</td>";
                strTable += "\n<td  class='cssReport4sTitle2'>TC</td>";
                strTable += "\n<td  class='cssReport4sTitle2'>0+</td>";
                //TC-Ngan Hang
                strTable += "\n<td  class='cssReport4sTitle2'>VB2</td>";
                strTable += "\n<td  class='cssReport4sTitle2'>CĐ</td>";
                strTable += "\n<td  class='cssReport4sTitle2'>TC#</td>";
                strTable += "\n<td  class='cssReport4sTitle2'>TC</td>";
                strTable += "\n<td  class='cssReport4sTitle2'>0+</td>";
                //IT
                strTable += "\n<td  class='cssReport4sTitle2'>VB2</td>";
                strTable += "\n<td  class='cssReport4sTitle2'>CĐ</td>";
                strTable += "\n<td  class='cssReport4sTitle2'>TC</td>";
                strTable += "\n<td  class='cssReport4sTitle2'>DIP</td>";
                strTable += "\n<td  class='cssReport4sTitle2'>0+</td>";
                strTable += "\n<td style='background-color:#FFFF00;'>&nbsp;</td>";
                strTable += "\n<td style='background-color:#FFFF00;'>&nbsp;</td>";
                //Tong 3
                strTable += "\n<td  class='cssReport4sTitle2'>VB2</td>";
                strTable += "\n<td  class='cssReport4sTitle2'>CĐ</td>";
                strTable += "\n<td  class='cssReport4sTitle2'>0+</td>";

                strTable += "\n<td  class='cssReport4sTitle2'>VB2</td>";
                strTable += "\n<td  class='cssReport4sTitle2'>CĐ</td>";
                strTable += "\n<td  class='cssReport4sTitle2'>TC#</td>";
                strTable += "\n<td  class='cssReport4sTitle2'>TC</td>";
                strTable += "\n<td  class='cssReport4sTitle2'>0+</td>";

                strTable += "\n<td  class='cssReport4sTitle2'>VB2</td>";
                strTable += "\n<td  class='cssReport4sTitle2'>CĐ</td>";
                strTable += "\n<td  class='cssReport4sTitle2'>TC#</td>";
                strTable += "\n<td  class='cssReport4sTitle2'>TC</td>";
                strTable += "\n<td  class='cssReport4sTitle2'>0+</td>";

                //IT
                strTable += "\n<td  class='cssReport4sTitle2'>VB2</td>";
                strTable += "\n<td  class='cssReport4sTitle2'>CĐ</td>";
                strTable += "\n<td  class='cssReport4sTitle2'>TC</td>";
                strTable += "\n<td  class='cssReport4sTitle2'>DIP</td>";
                strTable += "\n<td  class='cssReport4sTitle2'>0+</td>";
                strTable += "\n<td style='background-color:#FFFF00;'>&nbsp;</td>";
                strTable += "\n</tr>";
                #endregion
                loadLevelReport(ref strTable);
                strTable += "\n</table>";
                ltrTable.Text = strTable;
            }
            else
            {
                string strTable = "<table border='1' cellpadding='0' cellspacing='0' align='left' style='width:100%;'>";
                #region "Tieu de"
                strTable += "\n<tr>";
                strTable += "\n<td style='background-color:#800000;color:white;'> &nbsp;</td>";
                //Tong 1
                strTable += "\n<td colspan='18' style='background-color:#C0C0C0;' class='cssReport4sTitle1'>Còn tồn từ trước</td>";
                strTable += "\n<td class='cssReport4sTitle1'>Tổng</td>";
                strTable += "\n<td class='cssReport4sTitle1'>%</td>";
                //Tong 2
                strTable += "\n<td colspan='18' style='background-color:#C0C0C0;' class='cssReport4sTitle1'>Số lượng thi đợt này</td>";
                strTable += "\n<td class='cssReport4sTitle1'>Tổng</td>";
                strTable += "\n<td class='cssReport4sTitle1'>%</td>";
                //Tong 3
                strTable += "\n<td colspan='18' style='background-color:#C0C0C0;' class='cssReport4sTitle1'>Số liệu khai giảng</td>";
                strTable += "\n<td class='cssReport4sTitle1'>Tổng</td>";
                strTable += "\n</tr>";
                #endregion
                #region "Tieu de 2"
                strTable += "\n<tr>";
                strTable += "\n<td style='background-color:#800000;color:white;'>&nbsp;</td>";
                //Tong 1
                strTable += "\n<td colspan='3'>BA (QTKD)</td>";
                strTable += "\n<td colspan='5'>FI (Ke toan)</td>";
                strTable += "\n<td colspan='5'>FB (tai chinh - NH)</td>";
                strTable += "\n<td colspan='5'>IT (KS Tin hoc)</td>";
                strTable += "\n<td style='background-color:#FFFF00;'>&nbsp;</td>";
                strTable += "\n<td style='background-color:#FFFF00;'>&nbsp;</td>";
                //Tong 2
                strTable += "\n<td colspan='3'>BA (QTKD)</td>";
                strTable += "\n<td colspan='5'>FI (Ke toan)</td>";
                strTable += "\n<td colspan='5'>FB (tai chinh - NH)</td>";
                strTable += "\n<td colspan='5'>IT (KS Tin hoc)</td>";
                strTable += "\n<td style='background-color:#FFFF00;'>&nbsp;</td>";
                strTable += "\n<td style='background-color:#FFFF00;'>&nbsp;</td>";
                //Tong 3
                strTable += "\n<td colspan='3'>BA (QTKD)</td>";
                strTable += "\n<td colspan='5'>FI (Ke toan)</td>";
                strTable += "\n<td colspan='5'>FB (tai chinh - NH)</td>";
                strTable += "\n<td colspan='5'>IT (KS Tin hoc)</td>";
                strTable += "\n<td style='background-color:#FFFF00;'>&nbsp;</td>";
                strTable += "\n</tr>";
                #endregion
                #region "Tieu de 3"
                strTable += "\n<tr>";
                strTable += "\n<td style='background-color:#800000;color:white;'>&nbsp;</td>";
                //Tong 1
                strTable += "\n<td  width='20%' >VB2</td>";
                strTable += "\n<td>CĐ</td>";
                strTable += "\n<td>0+</td>";
                //Ke toan
                strTable += "\n<td>VB2</td>";
                strTable += "\n<td>CĐ</td>";
                strTable += "\n<td>TC#</td>";
                strTable += "\n<td>TC</td>";
                strTable += "\n<td>0+</td>";
                //TC-Ngan Hang
                strTable += "\n<td>VB2</td>";
                strTable += "\n<td>CĐ</td>";
                strTable += "\n<td>TC#</td>";
                strTable += "\n<td>TC</td>";
                strTable += "\n<td>0+</td>";
                //IT
                strTable += "\n<td>VB2</td>";
                strTable += "\n<td>CĐ</td>";
                strTable += "\n<td>TC</td>";
                strTable += "\n<td>DIP</td>";
                strTable += "\n<td>0+</td>";
                strTable += "\n<td style='background-color:#FFFF00;'>&nbsp;</td>";
                strTable += "\n<td style='background-color:#FFFF00;'>&nbsp;</td>";

                //Tong 2
                strTable += "\n<td>VB2</td>";
                strTable += "\n<td>CĐ</td>";
                strTable += "\n<td>0+</td>";
                //Ke toan
                strTable += "\n<td>VB2</td>";
                strTable += "\n<td>CĐ</td>";
                strTable += "\n<td>TC#</td>";
                strTable += "\n<td>TC</td>";
                strTable += "\n<td>0+</td>";
                //TC-Ngan Hang
                strTable += "\n<td>VB2</td>";
                strTable += "\n<td>CĐ</td>";
                strTable += "\n<td>TC#</td>";
                strTable += "\n<td>TC</td>";
                strTable += "\n<td>0+</td>";
                //IT
                strTable += "\n<td>VB2</td>";
                strTable += "\n<td>CĐ</td>";
                strTable += "\n<td>TC</td>";
                strTable += "\n<td>DIP</td>";
                strTable += "\n<td>0+</td>";
                strTable += "\n<td style='background-color:#FFFF00;'>&nbsp;</td>";
                strTable += "\n<td style='background-color:#FFFF00;'>&nbsp;</td>";
                //Tong 3
                strTable += "\n<td>VB2</td>";
                strTable += "\n<td>CĐ</td>";
                strTable += "\n<td>0+</td>";

                strTable += "\n<td>VB2</td>";
                strTable += "\n<td>CĐ</td>";
                strTable += "\n<td>TC#</td>";
                strTable += "\n<td>TC</td>";
                strTable += "\n<td>0+</td>";

                strTable += "\n<td>VB2</td>";
                strTable += "\n<td>CĐ</td>";
                strTable += "\n<td>TC#</td>";
                strTable += "\n<td>TC</td>";
                strTable += "\n<td>0+</td>";

                //IT
                strTable += "\n<td>VB2</td>";
                strTable += "\n<td>CĐ</td>";
                strTable += "\n<td>TC</td>";
                strTable += "\n<td>DIP</td>";
                strTable += "\n<td>0+</td>";
                strTable += "\n<td style='background-color:#FFFF00;'>&nbsp;</td>";
                strTable += "\n</tr>";
                #endregion
                loadLevelReport(ref strTable);
                strTable += "\n</table>";
                ltrTable.Text = strTable;
            }
        }
        //Inser vao bang Report4s
        private void InsertReport4s()
        {
            DateTime dateFirstMoth = DateTime.Today;
            foreach (string strLevel in strLevers)
            {
                try
                {
                    if (strLevel == "L1")
                    {
                        loadDataL5AL8(1);

                        objReport.insertReportS4(intTong, 0, intVB2BA, intCDBA, intKhacBA, intVB2FI, intCDFI, intTCKhacFI, intTCFI, intKhacFI,
                                            intVB2FB, intCDFB, intTCKhacFB, intTCFB, intKhacFB, intVB2IT, intCDIT, intTCIT, intDIPIT, intKhacIT, 1, dateFirstMoth);
                    }
                    else if (strLevel == "L2")
                    {
                        loadDataL5AL8(2);
                        objReport.insertReportS4(intTong, 0, intVB2BA, intCDBA, intKhacBA, intVB2FI, intCDFI, intTCKhacFI, intTCFI, intKhacFI,
                                            intVB2FB, intCDFB, intTCKhacFB, intTCFB, intKhacFB, intVB2IT, intCDIT, intTCIT, intDIPIT, intKhacIT, 2, dateFirstMoth);
                    }
                    else if (strLevel == "L3")
                    {
                        loadDataL5AL8(3);
                        objReport.insertReportS4(intTong, 0, intVB2BA, intCDBA, intKhacBA, intVB2FI, intCDFI, intTCKhacFI, intTCFI, intKhacFI,
                                            intVB2FB, intCDFB, intTCKhacFB, intTCFB, intKhacFB, intVB2IT, intCDIT, intTCIT, intDIPIT, intKhacIT, 3, dateFirstMoth);
                    }
                    else if (strLevel == "L4")
                    {
                        loadDataL5AL8(4);
                        objReport.insertReportS4(intTong, 0, intVB2BA, intCDBA, intKhacBA, intVB2FI, intCDFI, intTCKhacFI, intTCFI, intKhacFI,
                                            intVB2FB, intCDFB, intTCKhacFB, intTCFB, intKhacFB, intVB2IT, intCDIT, intTCIT, intDIPIT, intKhacIT, 4, dateFirstMoth);
                    }
                    else if (strLevel == "L5A")
                    {
                        loadDataL5AL8(5);
                        intTongCu = intTong;
                        objReport.insertReportS4(intTong, 0, intVB2BA, intCDBA, intKhacBA, intVB2FI, intCDFI, intTCKhacFI, intTCFI, intKhacFI,
                                            intVB2FB, intCDFB, intTCKhacFB, intTCFB, intKhacFB, intVB2IT, intCDIT, intTCIT, intDIPIT, intKhacIT, 5, dateFirstMoth);
                    }
                    else if (strLevel == "L5B")
                    {
                        loadDataL5AL8(6);
                        decPercentL5B = (Decimal)(intTong * 100 / intTongCu);
                        // decPercentL5B = Math.Round(decPercentL8, 0, MidpointRounding.AwayFromZero);

                        objReport.insertReportS4(intTong, Convert.ToInt32(decPercentL5B), intVB2BA, intCDBA, intKhacBA, intVB2FI, intCDFI, intTCKhacFI, intTCFI, intKhacFI,
                                            intVB2FB, intCDFB, intTCKhacFB, intTCFB, intKhacFB, intVB2IT, intCDIT, intTCIT, intDIPIT, intKhacIT, 6, dateFirstMoth);
                        intTongCu = intTong;

                    }
                    else if (strLevel == "L6")
                    {
                        loadDataL5AL8(7);
                        decPercentL6 = (Decimal)(intTong * 100 / intTongCu);
                        objReport.insertReportS4(intTong, Convert.ToInt32(decPercentL6), intVB2BA, intCDBA, intKhacBA, intVB2FI, intCDFI, intTCKhacFI, intTCFI, intKhacFI,
                                            intVB2FB, intCDFB, intTCKhacFB, intTCFB, intKhacFB, intVB2IT, intCDIT, intTCIT, intDIPIT, intKhacIT, 7, dateFirstMoth);
                        intTongCu = intTong;

                    }
                    else if (strLevel == "L7")
                    {
                        loadDataL5AL8(8);
                        decPercentL7 = (Decimal)(intTong * 100 / intTongCu);
                        objReport.insertReportS4(intTong, Convert.ToInt32(decPercentL7), intVB2BA, intCDBA, intKhacBA, intVB2FI, intCDFI, intTCKhacFI, intTCFI, intKhacFI,
                                            intVB2FB, intCDFB, intTCKhacFB, intTCFB, intKhacFB, intVB2IT, intCDIT, intTCIT, intDIPIT, intKhacIT, 8, dateFirstMoth);
                        intTongCu = intTong;

                    }
                    else if (strLevel == "L8")
                    {
                        loadDataL5AL8(9);
                        decPercentL8 = (Decimal)(intTong * 100 / intTongCu);
                        objReport.insertReportS4(intTong, Convert.ToInt32(decPercentL8), intVB2BA, intCDBA, intKhacBA, intVB2FI, intCDFI, intTCKhacFI, intTCFI, intKhacFI,
                                            intVB2FB, intCDFB, intTCKhacFB, intTCFB, intKhacFB, intVB2IT, intCDIT, intTCIT, intDIPIT, intKhacIT, 9, dateFirstMoth);
                        intTongCu = intTong;
                    }
                }
                catch (Exception ex)
                {
                }
            }
            Response.Write("<script>alert('Lưu thành công bản ghi!');</script>");
            loadHistoryDate();

        }
        private void loadHistoryDate()
        {
            DataTable dtData = new DataTable();
            dtData = objReport.getHistoryDateS4();
            if (dtData != null && dtData.Rows.Count > 0)
            {
                BindData.bindDropDownList(this.ddlHistory, dtData, "Date", "Ngay");
                this.ddlHistory.SelectedIndex = 0;
            }
        }
        #region "Export Excel"
        public void loadLevelReportExport(ref string strTable)
        {
            //Lay du lieu cho trang bao cao dau                  
            DateTime dtHistDate;
            string strDate = "";
            try
            {
                strDate = this.ddlHistory.SelectedValue.ToString().Trim();
                dtHistDate = Convert.ToDateTime(strDate);
            }
            catch
            {
                if (this.ddlHistory != null && this.ddlHistory.Items.Count > 0)
                {
                    strDate = this.ddlHistory.SelectedItem.Text.ToString().Trim();
                    dtHistDate = Convert.ToDateTime(strDate);
                }
                else
                {
                    strDate = "1/1/1990";
                    dtHistDate = Convert.ToDateTime(strDate);
                }
            }
            dtDataReport1 = new DataTable();
            dtDataReport1 = objReport.getDataFirstPageReportS4(dtHistDate);
            foreach (string strLevel in strLevers)
            {
                strTable += "\n<tr>";
                strTable += "\n<td style='background-color:#800000;color:white;font-family:Tahoma,Arial;font-weight:bold;font-size:12px;'> " + strLevel + "</td>";
                #region "L1"
                if (strLevel == "L1")
                {
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";

                    strTable += "\n<td style='background-color:#FFFF00;font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                    strTable += "\n<td style='background-color:#FFFF00;'>&nbsp;</td>";

                    //Tong 2
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='background-color:#FFFF00;'>&nbsp;</td>";
                    strTable += "\n<td style='background-color:#FFFF00;'>&nbsp;</td>";

                    //Tong 3
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='background-color:#FFFF00;'>&nbsp;</td>";
                }
                #endregion
                #region "L2"
                else if (strLevel == "L2")
                {
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";

                    strTable += "\n<td style='background-color:#FFFF00;font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                    strTable += "\n<td style='background-color:#FFFF00;'>&nbsp;</td>";

                    //Tong 2
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='background-color:#FFFF00;'>&nbsp;</td>";
                    strTable += "\n<td style='background-color:#FFFF00;'>&nbsp;</td>";

                    //Tong 3
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='background-color:#FFFF00;'>&nbsp;</td>";
                }
                #endregion
                #region "L3"
                else if (strLevel == "L3")
                {
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";

                    strTable += "\n<td style='background-color:#FFFF00;font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                    strTable += "\n<td style='background-color:#FFFF00;'>&nbsp;</td>";

                    //Tong 2
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='background-color:#FFFF00;'>&nbsp;</td>";
                    strTable += "\n<td style='background-color:#FFFF00;'>&nbsp;</td>";

                    //Tong 3
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='background-color:#FFFF00;'>&nbsp;</td>";
                }
                #endregion
                #region "L4"
                else if (strLevel == "L4")
                {
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
               
                    strTable += "\n<td style='background-color:#FFFF00;font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                    strTable += "\n<td style='background-color:#FFFF00;'>&nbsp;</td>";
                   
                    //Tong 2
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='background-color:#FFFF00;'>&nbsp;</td>";
                    strTable += "\n<td style='background-color:#FFFF00;'>&nbsp;</td>";

                    //Tong 3
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;' align='center'>x</td>";
                    strTable += "\n<td style='background-color:#FFFF00;'>&nbsp;</td>";
                }
                #endregion
                #region "L5A"
                else if (strLevel == "L5A")
                {
                    DataRow[] drReceiverTemp;
                    drReceiverTemp = dtDataReport1.Select("LevelID=5");
                    loadDataL5AL8(5);
                    //Tong1
                    //QTKD
                    if (drReceiverTemp.Length > 0)
                    {
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["VB2BA"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["CDBA"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["KhacBA"].ToString() + "</td>";
                        //Ke toan
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["VB2FI"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["CDFI"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["TCKhacFI"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["TCFI"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["KhacFI"].ToString() + "</td>";
                        //Tai Chinh - Ngan hang
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["VB2FB"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["CDFB"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["TCKhacFB"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["TCFB"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["KhacFB"].ToString() + "</td>";
                        //TinHoc
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["VB2IT"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["CDIT"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["TCIT"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["DIPIT"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["KhacIT"].ToString() + "</td>";
                        strTable += "\n<td style='background-color:#FFFF00;font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["SLT"].ToString() + "</td>";
                        strTable += "\n<td style='background-color:#FFFF00;font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["PhanTram"].ToString() + "%</td>";
                    }
                    else
                    {
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        //Ke toan
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        //Tai Chinh - Ngan hang
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        //TinHoc
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='background-color:#FFFF00;font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='background-color:#FFFF00;font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                    }

                    //Tong2
                    if (drReceiverTemp.Length > 0)
                    {
                        SumVB2BA = intVB2BA - Convert.ToInt32(drReceiverTemp[0]["VB2BA"]);
                        SumCDBA = intCDBA - Convert.ToInt32(drReceiverTemp[0]["CDBA"]);
                        SumKhacBA = intKhacBA - Convert.ToInt32(drReceiverTemp[0]["KhacBA"]);
                        //Sum Ke Toan
                        SumVB2FI = intVB2FI - Convert.ToInt32(drReceiverTemp[0]["VB2FI"]);
                        SumCDFI = intCDFI - Convert.ToInt32(drReceiverTemp[0]["CDFI"]);
                        SumTCKhacFI = intTCKhacFI - Convert.ToInt32(drReceiverTemp[0]["TCKhacFI"]);
                        SumTCFI = intTCFI - Convert.ToInt32(drReceiverTemp[0]["TCFI"]);
                        SumKhacFI = intKhacFI - Convert.ToInt32(drReceiverTemp[0]["KhacFI"]);
                        //Sum Tai chinh -Ngan hang
                        SumVB2FB = intVB2FB - Convert.ToInt32(drReceiverTemp[0]["VB2FB"]);
                        SumCDFB = intCDFB - Convert.ToInt32(drReceiverTemp[0]["CDFB"]);
                        SumTCKhacFB = intTCKhacFB - Convert.ToInt32(drReceiverTemp[0]["TCKhacFB"]);
                        SumTCFB = intTCFB - Convert.ToInt32(drReceiverTemp[0]["TCFB"]);
                        SumKhacFB = intKhacFB - Convert.ToInt32(drReceiverTemp[0]["KhacFB"]);
                        //Sum IT
                        SumVB2IT = intVB2IT - Convert.ToInt32(drReceiverTemp[0]["VB2IT"]);
                        SumCDIT = intCDIT - Convert.ToInt32(drReceiverTemp[0]["CDIT"]);
                        SumTCIT = intTCIT - Convert.ToInt32(drReceiverTemp[0]["TCIT"]);
                        SumDIPIT = intDIPIT - Convert.ToInt32(drReceiverTemp[0]["DIPIT"]);
                        SumKhacIT = intKhacIT - Convert.ToInt32(drReceiverTemp[0]["KhacIT"]);
                        //Sum Total
                        SumTotal = SumVB2BA + SumCDBA + SumKhacBA + SumVB2FI + SumCDFI + SumTCKhacFI + SumTCFI + SumKhacFI + SumVB2FB + SumCDFB + SumTCKhacFB + SumTCFB + SumKhacFB + SumVB2IT + SumCDIT + SumTCIT + SumDIPIT + SumKhacIT;
                        //QTKD
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumVB2BA.ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumCDBA.ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumKhacBA.ToString() + "</td>";
                        //Ke toan
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumVB2FI.ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumCDFI.ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumTCFI.ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumKhacFI.ToString() + "</td>";
                        //Tai Chinh - Ngan hang
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumVB2FB.ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumCDFB.ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumTCFB.ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumKhacFB.ToString() + "</td>";
                        //TinHoc
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumVB2IT.ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumCDIT.ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumTCIT.ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumKhacIT.ToString() + "</td>";

                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;background-color:#FFFF00;'>" + SumTotal + "</td>";
                        intTongCu = SumTotal;
                        strTable += "\n<td style='background-color:#FFFF00;font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                    }
                    else
                    {
                        //QTKD
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        //Ke toan
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        //Tai Chinh - Ngan hang
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        //TinHoc
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        //Tong va %   
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;background-color:#FFFF00;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;background-color:#FFFF00;'>&nbsp;</td>";
                    }

                    //Tong3                    
                    //QTKD
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + intVB2BA.ToString() + "</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + intCDBA.ToString() + "</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + intKhacBA.ToString() + "</td>";
                    //Ke toan
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + intVB2FI.ToString() + "</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + intCDFI.ToString() + "</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + intTCFI.ToString() + "</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + intKhacFI.ToString() + "</td>";
                    //Tai Chinh - Ngan hang
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + intVB2FB.ToString() + "</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + intCDFB.ToString() + "</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + intTCFB.ToString() + "</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + intKhacFB.ToString() + "</td>";
                    //TinHoc
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + intVB2IT.ToString() + "</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + intCDIT.ToString() + "</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + intTCIT.ToString() + "</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + intKhacIT.ToString() + "</td>";

                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;background-color:#FFFF00;'>" + intTong + "</td>";
                }
                #endregion
                #region "L5B"
                else if (strLevel == "L5B")
                {
                    DataRow[] drReceiverTemp;
                    drReceiverTemp = dtDataReport1.Select("LevelID=6");
                    loadDataL5AL8(6);
                    //Tong1
                    //QTKD
                    if (drReceiverTemp.Length > 0)
                    {
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["VB2BA"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["CDBA"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["KhacBA"].ToString() + "</td>";
                        //Ke toan
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["VB2FI"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["CDFI"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["TCKhacFI"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["TCFI"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["KhacFI"].ToString() + "</td>";
                        //Tai Chinh - Ngan hang
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["VB2FB"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["CDFB"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["TCKhacFB"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["TCFB"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["KhacFB"].ToString() + "</td>";
                        //TinHoc
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["VB2IT"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["CDIT"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["TCIT"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["DIPIT"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["KhacIT"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;background-color:#FFFF00;' >" + drReceiverTemp[0]["SLT"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;background-color:#FFFF00;' >" + drReceiverTemp[0]["PhanTram"].ToString() + "%</td>";
                    }
                    else
                    {
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        //Ke toan
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        //Tai Chinh - Ngan hang
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        //TinHoc
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;background-color:#FFFF00;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;background-color:#FFFF00;'>&nbsp;</td>";
                    }

                    //Tong2
                    if (drReceiverTemp.Length > 0)
                    {
                        SumVB2BA = intVB2BA - Convert.ToInt32(drReceiverTemp[0]["VB2BA"]);
                        SumCDBA = intCDBA - Convert.ToInt32(drReceiverTemp[0]["CDBA"]);
                        SumKhacBA = intKhacBA - Convert.ToInt32(drReceiverTemp[0]["KhacBA"]);
                        //Sum Ke Toan
                        SumVB2FI = intVB2FI - Convert.ToInt32(drReceiverTemp[0]["VB2FI"]);
                        SumCDFI = intCDFI - Convert.ToInt32(drReceiverTemp[0]["CDFI"]);
                        SumTCKhacFI = intTCKhacFI - Convert.ToInt32(drReceiverTemp[0]["TCKhacFI"]);
                        SumTCFI = intTCFI - Convert.ToInt32(drReceiverTemp[0]["TCFI"]);
                        SumKhacFI = intKhacFI - Convert.ToInt32(drReceiverTemp[0]["KhacFI"]);
                        //Sum Tai chinh -Ngan hang
                        SumVB2FB = intVB2FB - Convert.ToInt32(drReceiverTemp[0]["VB2FB"]);
                        SumCDFB = intCDFB - Convert.ToInt32(drReceiverTemp[0]["CDFB"]);
                        SumTCKhacFB = intTCKhacFB - Convert.ToInt32(drReceiverTemp[0]["TCKhacFB"]);
                        SumTCFB = intTCFB - Convert.ToInt32(drReceiverTemp[0]["TCFB"]);
                        SumKhacFB = intKhacFB - Convert.ToInt32(drReceiverTemp[0]["KhacFB"]);
                        //Sum IT
                        SumVB2IT = intVB2IT - Convert.ToInt32(drReceiverTemp[0]["VB2IT"]);
                        SumCDIT = intCDIT - Convert.ToInt32(drReceiverTemp[0]["CDIT"]);
                        SumTCIT = intTCIT - Convert.ToInt32(drReceiverTemp[0]["TCIT"]);
                        SumDIPIT = intDIPIT - Convert.ToInt32(drReceiverTemp[0]["DIPIT"]);
                        SumKhacIT = intKhacIT - Convert.ToInt32(drReceiverTemp[0]["KhacIT"]);
                        //Sum Total
                        SumTotal = SumVB2BA + SumCDBA + SumKhacBA + SumVB2FI + SumCDFI + SumTCKhacFI + SumTCFI + SumKhacFI + SumVB2FB + SumCDFB + SumTCKhacFB + SumTCFB + SumKhacFB + SumVB2IT + SumCDIT + SumTCIT + SumDIPIT + SumKhacIT;
                        //QTKD
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumVB2BA.ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumCDBA.ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumKhacBA.ToString() + "</td>";
                        //Ke toan
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumVB2FI.ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumCDFI.ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumTCFI.ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumKhacFI.ToString() + "</td>";
                        //Tai Chinh - Ngan hang
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumVB2FB.ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumCDFB.ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumTCFB.ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumKhacFB.ToString() + "</td>";
                        //TinHoc
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumVB2IT.ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumCDIT.ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumTCIT.ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumKhacIT.ToString() + "</td>";
                        //Tong va %   
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;background-color:#FFFF00;'>" + SumTotal + "</td>";
                        if (intTongCu == 0)
                        {
                            decPercentL5B = 0;
                        }
                        else
                        {
                            decPercentL5B = Convert.ToDecimal(SumTotal * 100 / intTongCu);
                        }
                        decPercentL5B = Math.Round(decPercentL5B, 0, MidpointRounding.AwayFromZero);
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;background-color:#FFFF00;'>" + decPercentL5B.ToString() + "%</td>";
                        intTongCu = SumTotal;
                    }
                    else
                    {
                        //QTKD
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        //Ke toan
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        //Tai Chinh - Ngan hang
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        //TinHoc
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        //Tong va %   
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;background-color:#FFFF00;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;background-color:#FFFF00;'>&nbsp;</td>";
                    }

                    //Tong3
                    //QTKD
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + intVB2BA.ToString() + "</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + intCDBA.ToString() + "</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + intKhacBA.ToString() + "</td>";
                    //Ke toan
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + intVB2FI.ToString() + "</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + intCDFI.ToString() + "</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + intTCFI.ToString() + "</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + intKhacFI.ToString() + "</td>";
                    //Tai Chinh - Ngan hang
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + intVB2FB.ToString() + "</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + intCDFB.ToString() + "</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + intTCFB.ToString() + "</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + intKhacFB.ToString() + "</td>";
                    //TinHoc
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + intVB2IT.ToString() + "</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + intCDIT.ToString() + "</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + intTCIT.ToString() + "</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + intKhacIT.ToString() + "</td>";

                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;background-color:#FFFF00;'>" + intTong + "</td>";
                }
                #endregion
                #region "L6"
                else if (strLevel == "L6")
                {
                    loadDataL5AL8(7);
                    //Tong1
                    DataRow[] drReceiverTemp;
                    drReceiverTemp = dtDataReport1.Select("LevelID=7");
                    //Tong1
                    //QTKD
                    if (drReceiverTemp.Length > 0)
                    {
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["VB2BA"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["CDBA"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["KhacBA"].ToString() + "</td>";
                        //Ke toan
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["VB2FI"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["CDFI"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["TCKhacFI"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["TCFI"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["KhacFI"].ToString() + "</td>";
                        //Tai Chinh - Ngan hang
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["VB2FB"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["CDFB"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["TCKhacFB"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["TCFB"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["KhacFB"].ToString() + "</td>";
                        //TinHoc
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["VB2IT"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["CDIT"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["TCIT"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["DIPIT"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["KhacIT"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;background-color:#FFFF00;'>" + drReceiverTemp[0]["SLT"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;background-color:#FFFF00;'>" + drReceiverTemp[0]["PhanTram"].ToString() + "%</td>";
                    }
                    else
                    {
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        //Ke toan
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        //Tai Chinh - Ngan hang
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        //TinHoc
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;background-color:#FFFF00;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;background-color:#FFFF00;'>&nbsp;</td>";
                    }

                    //Tong2
                    if (drReceiverTemp.Length > 0)
                    {
                        SumVB2BA = intVB2BA - Convert.ToInt32(drReceiverTemp[0]["VB2BA"]);
                        SumCDBA = intCDBA - Convert.ToInt32(drReceiverTemp[0]["CDBA"]);
                        SumKhacBA = intKhacBA - Convert.ToInt32(drReceiverTemp[0]["KhacBA"]);
                        //Sum Ke Toan
                        SumVB2FI = intVB2FI - Convert.ToInt32(drReceiverTemp[0]["VB2FI"]);
                        SumCDFI = intCDFI - Convert.ToInt32(drReceiverTemp[0]["CDFI"]);
                        SumTCKhacFI = intTCKhacFI - Convert.ToInt32(drReceiverTemp[0]["TCKhacFI"]);
                        SumTCFI = intTCFI - Convert.ToInt32(drReceiverTemp[0]["TCFI"]);
                        SumKhacFI = intKhacFI - Convert.ToInt32(drReceiverTemp[0]["KhacFI"]);
                        //Sum Tai chinh -Ngan hang
                        SumVB2FB = intVB2FB - Convert.ToInt32(drReceiverTemp[0]["VB2FB"]);
                        SumCDFB = intCDFB - Convert.ToInt32(drReceiverTemp[0]["CDFB"]);
                        SumTCKhacFB = intTCKhacFB - Convert.ToInt32(drReceiverTemp[0]["TCKhacFB"]);
                        SumTCFB = intTCFB - Convert.ToInt32(drReceiverTemp[0]["TCFB"]);
                        SumKhacFB = intKhacFB - Convert.ToInt32(drReceiverTemp[0]["KhacFB"]);
                        //Sum IT
                        SumVB2IT = intVB2IT - Convert.ToInt32(drReceiverTemp[0]["VB2IT"]);
                        SumCDIT = intCDIT - Convert.ToInt32(drReceiverTemp[0]["CDIT"]);
                        SumTCIT = intTCIT - Convert.ToInt32(drReceiverTemp[0]["TCIT"]);
                        SumDIPIT = intDIPIT - Convert.ToInt32(drReceiverTemp[0]["DIPIT"]);
                        SumKhacIT = intKhacIT - Convert.ToInt32(drReceiverTemp[0]["KhacIT"]);
                        //Sum Total
                        SumTotal = SumVB2BA + SumCDBA + SumKhacBA + SumVB2FI + SumCDFI + SumTCKhacFI + SumTCFI + SumKhacFI + SumVB2FB + SumCDFB + SumTCKhacFB + SumTCFB + SumKhacFB + SumVB2IT + SumCDIT + SumTCIT + SumDIPIT + SumKhacIT;
                        //QTKD
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumVB2BA.ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumCDBA.ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumKhacBA.ToString() + "</td>";
                        //Ke toan
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumVB2FI.ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumCDFI.ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumTCFI.ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumKhacFI.ToString() + "</td>";
                        //Tai Chinh - Ngan hang
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumVB2FB.ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumCDFB.ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumTCFB.ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumKhacFB.ToString() + "</td>";
                        //TinHoc
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumVB2IT.ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumCDIT.ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumTCIT.ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumKhacIT.ToString() + "</td>";
                        //Tong va %   
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;background-color:#FFFF00;'>" + SumTotal + "</td>";
                        if (intTongCu == 0)
                        {
                            decPercentL6 = 0;
                        }
                        else
                        {
                            decPercentL6 = Convert.ToDecimal(SumTotal * 100 / intTongCu);
                        }
                        decPercentL6 = Math.Round(decPercentL6, 0, MidpointRounding.AwayFromZero);
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;background-color:#FFFF00;'>" + decPercentL6.ToString() + "%</td>";
                        intTongCu = SumTotal;
                    }
                    else
                    {
                        //QTKD
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        //Ke toan
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        //Tai Chinh - Ngan hang
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        //TinHoc
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        //Tong va %   
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;background-color:#FFFF00;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;background-color:#FFFF00;'>&nbsp;</td>";
                    }

                    //Tong3
                    //QTKD
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + intVB2BA.ToString() + "</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + intCDBA.ToString() + "</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + intKhacBA.ToString() + "</td>";
                    //Ke toan
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + intVB2FI.ToString() + "</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + intCDFI.ToString() + "</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + intTCFI.ToString() + "</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + intKhacFI.ToString() + "</td>";
                    //Tai Chinh - Ngan hang
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + intVB2FB.ToString() + "</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + intCDFB.ToString() + "</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + intTCFB.ToString() + "</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + intKhacFB.ToString() + "</td>";
                    //TinHoc
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + intVB2IT.ToString() + "</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + intCDIT.ToString() + "</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + intTCIT.ToString() + "</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + intKhacIT.ToString() + "</td>";

                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;background-color:#FFFF00;'>" + intTong + "</td>";
                    intTongCu = intTong;
                }
                #endregion
                #region "L7"
                else if (strLevel == "L7")
                {
                    loadDataL5AL8(8);
                    //Tong1
                    //QTKD
                    DataRow[] drReceiverTemp;
                    drReceiverTemp = dtDataReport1.Select("LevelID=8");
                    //Tong1
                    //QTKD
                    if (drReceiverTemp.Length > 0)
                    {
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["VB2BA"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["CDBA"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["KhacBA"].ToString() + "</td>";
                        //Ke toan
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["VB2FI"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["CDFI"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["TCKhacFI"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["TCFI"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["KhacFI"].ToString() + "</td>";
                        //Tai Chinh - Ngan hang
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["VB2FB"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["CDFB"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["TCKhacFB"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["TCFB"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["KhacFB"].ToString() + "</td>";
                        //TinHoc
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["VB2IT"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["CDIT"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["TCIT"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["DIPIT"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["KhacIT"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;background-color:#FFFF00;'>" + drReceiverTemp[0]["SLT"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;background-color:#FFFF00;'>" + drReceiverTemp[0]["PhanTram"].ToString() + "%</td>";
                    }
                    else
                    {
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        //Ke toan
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        //Tai Chinh - Ngan hang
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        //TinHoc
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;background-color:#FFFF00;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;background-color:#FFFF00;' >&nbsp;</td>";
                    }

                    //Tong2
                    if (drReceiverTemp.Length > 0)
                    {
                        SumVB2BA = intVB2BA - Convert.ToInt32(drReceiverTemp[0]["VB2BA"]);
                        SumCDBA = intCDBA - Convert.ToInt32(drReceiverTemp[0]["CDBA"]);
                        SumKhacBA = intKhacBA - Convert.ToInt32(drReceiverTemp[0]["KhacBA"]);
                        //Sum Ke Toan
                        SumVB2FI = intVB2FI - Convert.ToInt32(drReceiverTemp[0]["VB2FI"]);
                        SumCDFI = intCDFI - Convert.ToInt32(drReceiverTemp[0]["CDFI"]);
                        SumTCKhacFI = intTCKhacFI - Convert.ToInt32(drReceiverTemp[0]["TCKhacFI"]);
                        SumTCFI = intTCFI - Convert.ToInt32(drReceiverTemp[0]["TCFI"]);
                        SumKhacFI = intKhacFI - Convert.ToInt32(drReceiverTemp[0]["KhacFI"]);
                        //Sum Tai chinh -Ngan hang
                        SumVB2FB = intVB2FB - Convert.ToInt32(drReceiverTemp[0]["VB2FB"]);
                        SumCDFB = intCDFB - Convert.ToInt32(drReceiverTemp[0]["CDFB"]);
                        SumTCKhacFB = intTCKhacFB - Convert.ToInt32(drReceiverTemp[0]["TCKhacFB"]);
                        SumTCFB = intTCFB - Convert.ToInt32(drReceiverTemp[0]["TCFB"]);
                        SumKhacFB = intKhacFB - Convert.ToInt32(drReceiverTemp[0]["KhacFB"]);
                        //Sum IT
                        SumVB2IT = intVB2IT - Convert.ToInt32(drReceiverTemp[0]["VB2IT"]);
                        SumCDIT = intCDIT - Convert.ToInt32(drReceiverTemp[0]["CDIT"]);
                        SumTCIT = intTCIT - Convert.ToInt32(drReceiverTemp[0]["TCIT"]);
                        SumDIPIT = intDIPIT - Convert.ToInt32(drReceiverTemp[0]["DIPIT"]);
                        SumKhacIT = intKhacIT - Convert.ToInt32(drReceiverTemp[0]["KhacIT"]);
                        //Sum Total
                        SumTotal = SumVB2BA + SumCDBA + SumKhacBA + SumVB2FI + SumCDFI + SumTCKhacFI + SumTCFI + SumKhacFI + SumVB2FB + SumCDFB + SumTCKhacFB + SumTCFB + SumKhacFB + SumVB2IT + SumCDIT + SumTCIT + SumDIPIT + SumKhacIT;
                        //QTKD
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumVB2BA.ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumCDBA.ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumKhacBA.ToString() + "</td>";
                        //Ke toan
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumVB2FI.ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumCDFI.ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumTCFI.ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumKhacFI.ToString() + "</td>";
                        //Tai Chinh - Ngan hang
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumVB2FB.ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumCDFB.ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumTCFB.ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumKhacFB.ToString() + "</td>";
                        //TinHoc
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumVB2IT.ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumCDIT.ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumTCIT.ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumKhacIT.ToString() + "</td>";
                        //Tong va %   
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;background-color:#FFFF00;'>" + SumTotal + "</td>";
                        if (intTongCu == 0)
                        {
                            decPercentL7 = 0;
                        }
                        else
                        {
                            decPercentL7 = Convert.ToDecimal(SumTotal * 100 / intTongCu);
                        }
                        decPercentL7 = Math.Round(decPercentL7, 0, MidpointRounding.AwayFromZero);
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;background-color:#FFFF00;'>" + decPercentL7.ToString() + "%</td>";
                        intTongCu = SumTotal;
                    }
                    else
                    {
                        //QTKD
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        //Ke toan
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        //Tai Chinh - Ngan hang
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        //TinHoc
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        //Tong va %   
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;background-color:#FFFF00;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;background-color:#FFFF00;'>&nbsp;</td>";
                    }

                    //Tong3
                    //QTKD
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + intVB2BA.ToString() + "</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + intCDBA.ToString() + "</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + intKhacBA.ToString() + "</td>";
                    //Ke toan
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + intVB2FI.ToString() + "</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + intCDFI.ToString() + "</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + intTCFI.ToString() + "</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + intKhacFI.ToString() + "</td>";
                    //Tai Chinh - Ngan hang
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + intVB2FB.ToString() + "</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + intCDFB.ToString() + "</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + intTCFB.ToString() + "</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + intKhacFB.ToString() + "</td>";
                    //TinHoc
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + intVB2IT.ToString() + "</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + intCDIT.ToString() + "</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + intTCIT.ToString() + "</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + intKhacIT.ToString() + "</td>";

                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;background-color:#FFFF00;'>" + intTong + "</td>";
                    intTongCu = intTong;
                }
                #endregion
                #region "L8"
                else if (strLevel == "L8")
                {
                    loadDataL5AL8(9);
                    DataRow[] drReceiverTemp;
                    drReceiverTemp = dtDataReport1.Select("LevelID=9");
                    //Tong1
                    //QTKD
                    if (drReceiverTemp.Length > 0)
                    {
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["VB2BA"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["CDBA"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["KhacBA"].ToString() + "</td>";
                        //Ke toan
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["VB2FI"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["CDFI"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["TCKhacFI"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["TCFI"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["KhacFI"].ToString() + "</td>";
                        //Tai Chinh - Ngan hang
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["VB2FB"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["CDFB"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["TCKhacFB"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["TCFB"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["KhacFB"].ToString() + "</td>";
                        //TinHoc
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["VB2IT"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["CDIT"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["TCIT"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["DIPIT"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["KhacIT"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;background-color:#FFFF00;'>" + drReceiverTemp[0]["SLT"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;background-color:#FFFF00;'>" + drReceiverTemp[0]["PhanTram"].ToString() + "%</td>";
                    }
                    else
                    {
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        //Ke toan
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        //Tai Chinh - Ngan hang
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        //TinHoc
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;background-color:#FFFF00;' style=''>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;background-color:#FFFF00;' style=''>&nbsp;</td>";
                    }


                    //Tong2
                    if (drReceiverTemp.Length > 0)
                    {
                        SumVB2BA = intVB2BA - Convert.ToInt32(drReceiverTemp[0]["VB2BA"]);
                        SumCDBA = intCDBA - Convert.ToInt32(drReceiverTemp[0]["CDBA"]);
                        SumKhacBA = intKhacBA - Convert.ToInt32(drReceiverTemp[0]["KhacBA"]);
                        //Sum Ke Toan
                        SumVB2FI = intVB2FI - Convert.ToInt32(drReceiverTemp[0]["VB2FI"]);
                        SumCDFI = intCDFI - Convert.ToInt32(drReceiverTemp[0]["CDFI"]);
                        SumTCKhacFI = intTCKhacFI - Convert.ToInt32(drReceiverTemp[0]["TCKhacFI"]);
                        SumTCFI = intTCFI - Convert.ToInt32(drReceiverTemp[0]["TCFI"]);
                        SumKhacFI = intKhacFI - Convert.ToInt32(drReceiverTemp[0]["KhacFI"]);
                        //Sum Tai chinh -Ngan hang
                        SumVB2FB = intVB2FB - Convert.ToInt32(drReceiverTemp[0]["VB2FB"]);
                        SumCDFB = intCDFB - Convert.ToInt32(drReceiverTemp[0]["CDFB"]);
                        SumTCKhacFB = intTCKhacFB - Convert.ToInt32(drReceiverTemp[0]["TCKhacFB"]);
                        SumTCFB = intTCFB - Convert.ToInt32(drReceiverTemp[0]["TCFB"]);
                        SumKhacFB = intKhacFB - Convert.ToInt32(drReceiverTemp[0]["KhacFB"]);
                        //Sum IT
                        SumVB2IT = intVB2IT - Convert.ToInt32(drReceiverTemp[0]["VB2IT"]);
                        SumCDIT = intCDIT - Convert.ToInt32(drReceiverTemp[0]["CDIT"]);
                        SumTCIT = intTCIT - Convert.ToInt32(drReceiverTemp[0]["TCIT"]);
                        SumDIPIT = intDIPIT - Convert.ToInt32(drReceiverTemp[0]["DIPIT"]);
                        SumKhacIT = intKhacIT - Convert.ToInt32(drReceiverTemp[0]["KhacIT"]);
                        //Sum Total
                        SumTotal = SumVB2BA + SumCDBA + SumKhacBA + SumVB2FI + SumCDFI + SumTCKhacFI + SumTCFI + SumKhacFI + SumVB2FB + SumCDFB + SumTCKhacFB + SumTCFB + SumKhacFB + SumVB2IT + SumCDIT + SumTCIT + SumDIPIT + SumKhacIT;
                        //QTKD
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumVB2BA.ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumCDBA.ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumKhacBA.ToString() + "</td>";
                        //Ke toan
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumVB2FI.ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumCDFI.ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumTCFI.ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumKhacFI.ToString() + "</td>";
                        //Tai Chinh - Ngan hang
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumVB2FB.ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumCDFB.ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumTCFB.ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumKhacFB.ToString() + "</td>";
                        //TinHoc
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumVB2IT.ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumCDIT.ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumTCIT.ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumKhacIT.ToString() + "</td>";
                        //Tong va %   
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;background-color:#FFFF00;'>" + SumTotal + "</td>";
                        if (intTongCu == 0)
                        {
                            decPercentL8 = 0;
                        }
                        else
                        {
                            decPercentL8 = Convert.ToDecimal(SumTotal * 100 / intTongCu);
                        }
                        decPercentL5B = Math.Round(decPercentL8, 0, MidpointRounding.AwayFromZero);
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;background-color:#FFFF00;'>" + decPercentL8.ToString() + "%</td>";
                        intTongCu = SumTotal;
                    }
                    else
                    {
                        //QTKD
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        //Ke toan
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        //Tai Chinh - Ngan hang
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        //TinHoc
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        //Tong va %   
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;background-color:#FFFF00;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;background-color:#FFFF00;'>&nbsp;</td>";

                    }

                    //Tong3
                    //QTKD
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + intVB2BA.ToString() + "</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + intCDBA.ToString() + "</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + intKhacBA.ToString() + "</td>";
                    //Ke toan
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + intVB2FI.ToString() + "</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + intCDFI.ToString() + "</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + intTCFI.ToString() + "</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + intKhacFI.ToString() + "</td>";
                    //Tai Chinh - Ngan hang
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + intVB2FB.ToString() + "</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + intCDFB.ToString() + "</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + intTCFB.ToString() + "</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + intKhacFB.ToString() + "</td>";
                    //TinHoc
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + intVB2IT.ToString() + "</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + intCDIT.ToString() + "</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + intTCIT.ToString() + "</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + intKhacIT.ToString() + "</td>";

                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;background-color:#FFFF00;'>" + intTong + "</td>";
                    intTongCu = intTong;
                }
                #endregion
                #region "L9"
                else if (strLevel == "L9")
                {
                    loadDataL5AL8(10);
                    DataRow[] drReceiverTemp;
                    drReceiverTemp = dtDataReport1.Select("LevelID=10");
                    //Tong1
                    //QTKD
                    if (drReceiverTemp.Length > 0)
                    {
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["VB2BA"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["CDBA"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["KhacBA"].ToString() + "</td>";
                        //Ke toan
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["VB2FI"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["CDFI"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["TCKhacFI"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["TCFI"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["KhacFI"].ToString() + "</td>";
                        //Tai Chinh - Ngan hang
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["VB2FB"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["CDFB"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["TCKhacFB"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["TCFB"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["KhacFB"].ToString() + "</td>";
                        //TinHoc
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["VB2IT"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["CDIT"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["TCIT"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["DIPIT"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + drReceiverTemp[0]["KhacIT"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;background-color:#FFFF00;'>" + drReceiverTemp[0]["SLT"].ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;background-color:#FFFF00;'>" + drReceiverTemp[0]["PhanTram"].ToString() + "%</td>";
                    }
                    else
                    {
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        //Ke toan
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        //Tai Chinh - Ngan hang
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        //TinHoc
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;background-color:#FFFF00;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;background-color:#FFFF00;'>&nbsp;</td>";
                    }

                    //Tong2
                    if (drReceiverTemp.Length > 0)
                    {
                        SumVB2BA = intVB2BA - Convert.ToInt32(drReceiverTemp[0]["VB2BA"]);
                        SumCDBA = intCDBA - Convert.ToInt32(drReceiverTemp[0]["CDBA"]);
                        SumKhacBA = intKhacBA - Convert.ToInt32(drReceiverTemp[0]["KhacBA"]);
                        //Sum Ke Toan
                        SumVB2FI = intVB2FI - Convert.ToInt32(drReceiverTemp[0]["VB2FI"]);
                        SumCDFI = intCDFI - Convert.ToInt32(drReceiverTemp[0]["CDFI"]);
                        SumTCKhacFI = intTCKhacFI - Convert.ToInt32(drReceiverTemp[0]["TCKhacFI"]);
                        SumTCFI = intTCFI - Convert.ToInt32(drReceiverTemp[0]["TCFI"]);
                        SumKhacFI = intKhacFI - Convert.ToInt32(drReceiverTemp[0]["KhacFI"]);
                        //Sum Tai chinh -Ngan hang
                        SumVB2FB = intVB2FB - Convert.ToInt32(drReceiverTemp[0]["VB2FB"]);
                        SumCDFB = intCDFB - Convert.ToInt32(drReceiverTemp[0]["CDFB"]);
                        SumTCKhacFB = intTCKhacFB - Convert.ToInt32(drReceiverTemp[0]["TCKhacFB"]);
                        SumTCFB = intTCFB - Convert.ToInt32(drReceiverTemp[0]["TCFB"]);
                        SumKhacFB = intKhacFB - Convert.ToInt32(drReceiverTemp[0]["KhacFB"]);
                        //Sum IT
                        SumVB2IT = intVB2IT - Convert.ToInt32(drReceiverTemp[0]["VB2IT"]);
                        SumCDIT = intCDIT - Convert.ToInt32(drReceiverTemp[0]["CDIT"]);
                        SumTCIT = intTCIT - Convert.ToInt32(drReceiverTemp[0]["TCIT"]);
                        SumDIPIT = intDIPIT - Convert.ToInt32(drReceiverTemp[0]["DIPIT"]);
                        SumKhacIT = intKhacIT - Convert.ToInt32(drReceiverTemp[0]["KhacIT"]);
                        //Sum Total
                        SumTotal = SumVB2BA + SumCDBA + SumKhacBA + SumVB2FI + SumCDFI + SumTCKhacFI + SumTCFI + SumKhacFI + SumVB2FB + SumCDFB + SumTCKhacFB + SumTCFB + SumKhacFB + SumVB2IT + SumCDIT + SumTCIT + SumDIPIT + SumKhacIT;
                        //QTKD
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumVB2BA.ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumCDBA.ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumKhacBA.ToString() + "</td>";
                        //Ke toan
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumVB2FI.ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumCDFI.ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumTCFI.ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumKhacFI.ToString() + "</td>";
                        //Tai Chinh - Ngan hang
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumVB2FB.ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumCDFB.ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumTCFB.ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumKhacFB.ToString() + "</td>";
                        //TinHoc
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumVB2IT.ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumCDIT.ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumTCIT.ToString() + "</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>" + SumKhacIT.ToString() + "</td>";
                        //Tong va %   
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;background-color:#FFFF00;'>" + SumTotal + "</td>";
                        if (intTongCu == 0)
                        {
                            decPercentL9 = 0;
                        }
                        else
                        {
                            decPercentL9 = Convert.ToDecimal(SumTotal * 100 / intTongCu);
                        }
                        decPercentL5B = Math.Round(decPercentL8, 0, MidpointRounding.AwayFromZero);
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;background-color:#FFFF00;'>" + decPercentL9.ToString() + "%</td>";
                        intTongCu = SumTotal;
                    }
                    else
                    {
                        //QTKD
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        //Ke toan
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        //Tai Chinh - Ngan hang
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        //TinHoc
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                        //Tong va %   
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;background-color:#FFFF00;'>&nbsp;</td>";
                        strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;background-color:#FFFF00;'>&nbsp;</td>";

                    }

                    //Tong3
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                    //Ke toan
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                    //Tai Chinh - Ngan hang
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;'>&nbsp;</td>";
                    strTable += "\n<td style='font-family:Verdana;font-size: 11px;font-weight:bold;color:#000000;background-color:#FFFF00;'>&nbsp;</td>";
                }
                #endregion
                strTable += "\n</tr>";
            }
        }
        public void SaveExcel(string html, string strNamFile)
        {
            Response.Cache.SetExpires(DateTime.Now.AddSeconds(1));
            Response.Clear();
            Response.AppendHeader("content-disposition", "attachment;filename=" + strNamFile);
            Response.Charset = "";
            Response.Cache.SetCacheability(HttpCacheability.NoCache);
            Response.ContentType = "application/vnd.ms-excel";
            this.EnableViewState = false;
            Response.Write("\r\n");
            Response.Write(html);
            Response.End();
        }
        public string loadExportReport4s()
        {
            try
            {
                string strHTML = "<html xmlns:o=\"urn:schemas-microsoft-com:office:office\" ";
                strHTML += "\n xmlns:x=\"urn:schemas-microsoft-com:office:excel\" ";
                strHTML += "\n xmlns=\"http://www.w3.org/TR/REC-html40\"> ";
                strHTML += "\n <head> ";
                strHTML += "\n <meta http-equiv=Content-Type content=\"text/html; charset=UTF-8\"> ";
                strHTML += "\n <meta name=ProgId content=Excel.Sheet> ";
                strHTML += "\n <meta name=Generator content=\"Microsoft Excel 11\"> ";
                strHTML += "\n <link rel=File-List ";
                strHTML += "\n href=\"New%20Microsoft%20Excel%20Worksheet_files/filelist.xml\"> ";
                strHTML += "\n <link rel=Edit-Time-Data ";
                strHTML += "\n href=\"New%20Microsoft%20Excel%20Worksheet_files/editdata.mso\"> ";
                strHTML += "\n <link rel=OLE-Object-Data ";
                strHTML += "\n href=\"New%20Microsoft%20Excel%20Worksheet_files/oledata.mso\"> ";
                strHTML += "\n <!--[if gte mso 9]><xml> ";
                strHTML += "\n  <o:DocumentProperties> ";
                strHTML += "\n   <o:LastAuthor>User</o:LastAuthor> ";
                strHTML += "\n   <o:Created>1996-10-14T23:33:28Z</o:Created> ";
                strHTML += "\n   <o:LastSaved>2009-06-04T09:49:20Z</o:LastSaved> ";
                strHTML += "\n   <o:Version>11.5606</o:Version> ";
                strHTML += "\n </o:DocumentProperties> ";
                strHTML += "\n </xml><![endif]--> ";
                strHTML += "\n <style> ";
                strHTML += "\n <!--table ";
                strHTML += "\n      {mso-displayed-decimal-separator:\"\\.\"; ";
                strHTML += "\n      mso-displayed-thousand-separator:\"\\,\";} ";
                strHTML += "\n @page ";
                strHTML += "\n      {margin:1.0in .75in 1.0in .75in; ";
                strHTML += "\n      mso-header-margin:.5in; ";
                strHTML += "\n 	mso-footer-margin:.5in;} ";
                strHTML += "\n tr ";
                strHTML += "\n 	{mso-height-source:auto;} ";
                strHTML += "\n col ";
                strHTML += "\n 	{mso-width-source:auto;} ";
                strHTML += "\n br ";
                strHTML += "\n 	{mso-data-placement:same-cell;} ";
                strHTML += "\n .style0 ";
                strHTML += "\n 	{mso-number-format:General; ";
                strHTML += "\n 	text-align:general; ";
                strHTML += "\n 	vertical-align:bottom; ";
                strHTML += "\n 	white-space:nowrap; ";
                strHTML += "\n 	mso-rotate:0; ";
                strHTML += "\n 	mso-background-source:auto; ";
                strHTML += "\n 	mso-pattern:auto; ";
                strHTML += "\n 	color:windowtext; ";
                strHTML += "\n 	font-size:10.0pt; ";
                strHTML += "\n 	font-weight:400; ";
                strHTML += "\n 	font-style:normal; ";
                strHTML += "\n 	text-decoration:none; ";
                strHTML += "\n 	font-family:Arial; ";
                strHTML += "\n 	mso-generic-font-family:auto; ";
                strHTML += "\n 	mso-font-charset:0; ";
                strHTML += "\n 	border:none; ";
                strHTML += "\n 	mso-protection:locked visible; ";
                strHTML += "\n 	mso-style-name:Normal; ";
                strHTML += "\n 	mso-style-id:0;} ";
                strHTML += "\n td ";
                strHTML += "\n 	{mso-style-parent:style0; ";
                strHTML += "\n 	padding-top:1px; ";
                strHTML += "\n 	padding-right:1px; ";
                strHTML += "\n 	padding-left:1px; ";
                strHTML += "\n 	mso-ignore:padding; ";
                strHTML += "\n 	color:windowtext; ";
                strHTML += "\n 	font-size:10.0pt; ";
                strHTML += "\n 	font-weight:400; ";
                strHTML += "\n 	font-style:normal; ";
                strHTML += "\n 	text-decoration:none; ";
                strHTML += "\n 	font-family:Arial; ";
                strHTML += "\n 	mso-generic-font-family:auto; ";
                strHTML += "\n 	mso-font-charset:0; ";
                strHTML += "\n 	mso-number-format:General; ";
                strHTML += "\n 	text-align:general; ";
                strHTML += "\n 	vertical-align:bottom; ";
                strHTML += "\n 	border:none; ";
                strHTML += "\n 	mso-background-source:auto; ";
                strHTML += "\n 	mso-pattern:auto; ";
                strHTML += "\n 	mso-protection:locked visible; ";
                strHTML += "\n 	white-space:nowrap; ";
                strHTML += "\n 	mso-rotate:0;} ";
                strHTML += "\n .xl23 ";
                strHTML += "\n 	{mso-style-parent:style0; ";
                strHTML += "\n 		font-weight:1600; ";
                strHTML += "\n 		font-family:Arial, sans-serif; ";
                strHTML += "\n 		mso-font-charset:0; ";
                strHTML += "\n 		mso-pattern:auto none;} ";
                strHTML += "\n 	text-align:center;} ";
                strHTML += "\n .xl24 ";
                strHTML += "\n 	{mso-style-parent:style0; ";
                strHTML += "\n 	    color: white; ";
                strHTML += "\n 		font-weight:1000; ";
                strHTML += "\n 		font-family:Arial, sans-serif; ";
                strHTML += "\n 		mso-font-charset:0; ";
                strHTML += "\n 		text-align:center; ";
                strHTML += "\n 		background:Black; ";
                strHTML += "\n 		mso-pattern:auto none;} ";
                strHTML += "\n 	text-align:center;} ";
                strHTML += "\n 	.xl25 ";
                strHTML += "\n 	{	font-family:Arial, sans-serif; ";
                strHTML += "\n 		mso-font-charset:0; ";
                strHTML += "\n 		text-align:center; ";
                strHTML += "\n 		mso-pattern:auto none;} ";
                strHTML += "\n 	.xl26 ";
                strHTML += "\n 		{mso-style-parent:style0; ";
                strHTML += "\n 		mso-pattern:auto none;} ";
                strHTML += "\n --> ";
                strHTML += "\n </style> ";
                strHTML += "\n <!--[if gte mso 9]><xml> ";
                strHTML += "\n  <x:ExcelWorkbook> ";
                strHTML += "\n   <x:ExcelWorksheets> ";
                strHTML += "\n    <x:ExcelWorksheet> ";
                strHTML += "\n     <x:Name>Sheet1</x:Name> ";
                strHTML += "\n     <x:WorksheetOptions> ";
                strHTML += "\n      <x:Selected/> ";
                strHTML += "\n      <x:Panes> ";
                strHTML += "\n       <x:Pane> ";
                strHTML += "\n        <x:Number>3</x:Number> ";
                strHTML += "\n        <x:ActiveRow>2</x:ActiveRow> ";
                strHTML += "\n        <x:ActiveCol>3</x:ActiveCol> ";
                strHTML += "\n       </x:Pane> ";
                strHTML += "\n      </x:Panes> ";
                strHTML += "\n      <x:ProtectContents>False</x:ProtectContents> ";
                strHTML += "\n      <x:ProtectObjects>False</x:ProtectObjects> ";
                strHTML += "\n      <x:ProtectScenarios>False</x:ProtectScenarios> ";
                strHTML += "\n     </x:WorksheetOptions> ";
                strHTML += "\n    </x:ExcelWorksheet> ";
                strHTML += "\n    <x:ExcelWorksheet> ";
                strHTML += "\n     <x:Name>Sheet2</x:Name> ";
                strHTML += "\n     <x:WorksheetOptions> ";
                strHTML += "\n      <x:ProtectContents>False</x:ProtectContents> ";
                strHTML += "\n      <x:ProtectObjects>False</x:ProtectObjects> ";
                strHTML += "\n      <x:ProtectScenarios>False</x:ProtectScenarios> ";
                strHTML += "\n     </x:WorksheetOptions> ";
                strHTML += "\n    </x:ExcelWorksheet> ";
                strHTML += "\n    <x:ExcelWorksheet> ";
                strHTML += "\n     <x:Name>Sheet3</x:Name> ";
                strHTML += "\n     <x:WorksheetOptions> ";
                strHTML += "\n      <x:ProtectContents>False</x:ProtectContents> ";
                strHTML += "\n      <x:ProtectObjects>False</x:ProtectObjects> ";
                strHTML += "\n      <x:ProtectScenarios>False</x:ProtectScenarios> ";
                strHTML += "\n     </x:WorksheetOptions> ";
                strHTML += "\n    </x:ExcelWorksheet> ";
                strHTML += "\n   </x:ExcelWorksheets> ";
                strHTML += "\n   <x:WindowHeight>9300</x:WindowHeight> ";
                strHTML += "\n   <x:WindowWidth>15135</x:WindowWidth> ";
                strHTML += "\n   <x:WindowTopX>120</x:WindowTopX> ";
                strHTML += "\n   <x:WindowTopY>120</x:WindowTopY> ";
                strHTML += "\n   <x:AcceptLabelsInFormulas/> ";
                strHTML += "\n   <x:ProtectStructure>False</x:ProtectStructure> ";
                strHTML += "\n   <x:ProtectWindows>False</x:ProtectWindows> ";
                strHTML += "\n  </x:ExcelWorkbook> ";
                strHTML += "\n </xml><![endif]--> ";
                strHTML += "\n </head> ";
                strHTML += "\n <body link=blue vlink=purple> ";
                this.lblMess.Text = "";
                if (this.ddlHistory.Items.Count > 0)
                {
                    DateTime dtHistDate;
                    string strDate = "";
                    try
                    {
                        strDate = this.ddlHistory.SelectedValue.ToString().Trim();
                        dtHistDate = Convert.ToDateTime(strDate);
                        strDate = dtHistDate.ToString("dd/MM/yyyy").Trim();
                    }
                    catch
                    {
                        strDate = this.ddlHistory.SelectedItem.Text.ToString().Trim();
                        dtHistDate = Convert.ToDateTime(strDate);
                    }
                    DataTable dtDataReport2 = objReport.getDataFirstPageReportS4(dtHistDate);
                    string strStarDate = txtDate.SelectedDate.ToString("dd/MM/yyyy").Trim();
                    strHTML  = "\n<table border='1' cellpadding='0' cellspacing='0' align='left' style='width:100%;'>";
                    #region "Tieu de"
                    strHTML += "\n<tr>";
                    strHTML += "\n<td style='background-color:#800000;color:white;'> &nbsp;</td>";
                    //Tong 1
                    strHTML += "\n<td colspan='18' style='background-color:#C0C0C0;font-family: tahoma;font-size: 12px;font-weight:bold;' align='center'>Còn tồn từ trước</td>";
                    strHTML += "\n<td style='font-family: tahoma;font-size: 12px;font-weight:bold;'>Tổng</td>";
                    strHTML += "\n<td style='font-family: tahoma;font-size: 12px;font-weight:bold;'>%</td>";
                    //Tong 2
                    strHTML += "\n<td colspan='18' style='background-color:#C0C0C0;font-family: tahoma;font-size: 12px;font-weight:bold;' align='center'>Số lượng thi đợt này</td>";
                    strHTML += "\n<td style='font-family: tahoma;font-size: 12px;font-weight:bold;'>Tổng</td>";
                    strHTML += "\n<td style='font-family: tahoma;font-size: 12px;font-weight:bold;'>%</td>";
                    //Tong 3
                    strHTML += "\n<td colspan='18' style='background-color:#C0C0C0;font-family: tahoma;font-size: 12px;font-weight:bold;' align='center'>Số liệu khai giảng (từ:" + strDate + " đến:" + strStarDate + ")</td>";
                    strHTML += "\n<td style='font-family: tahoma;font-size: 12px;font-weight:bold;'>Tổng</td>";
                    strHTML += "\n</tr>";
                    #endregion
                    #region "Tieu de 2"
                    strHTML += "\n<tr>";
                    strHTML += "\n<td style='background-color:#800000;color:white;'>&nbsp;</td>";
                    //Tong 1
                    strHTML += "\n<td colspan='3' style='font-family: tahoma;font-size: 12px;font-weight:bold;'>BA (QTKD)</td>";
                    strHTML += "\n<td colspan='5' style='font-family: tahoma;font-size: 12px;font-weight:bold;'>FI (Ke toan)</td>";
                    strHTML += "\n<td colspan='5' style='font-family: tahoma;font-size: 12px;font-weight:bold;'>FB (tai chinh - NH)</td>";
                    strHTML += "\n<td colspan='5' style='font-family: tahoma;font-size: 12px;font-weight:bold;'>IT (KS Tin hoc)</td>";
                    strHTML += "\n<td style='background-color:#FFFF00;'>&nbsp;</td>";
                    strHTML += "\n<td style='background-color:#FFFF00;'>&nbsp;</td>";
                    //Tong 2
                    strHTML += "\n<td colspan='3' style='font-family: tahoma;font-size: 12px;font-weight:bold;'>BA (QTKD)</td>";
                    strHTML += "\n<td colspan='5' style='font-family: tahoma;font-size: 12px;font-weight:bold;'>FI (Ke toan)</td>";
                    strHTML += "\n<td colspan='5' style='font-family: tahoma;font-size: 12px;font-weight:bold;'>FB (tai chinh - NH)</td>";
                    strHTML += "\n<td colspan='5' style='font-family: tahoma;font-size: 12px;font-weight:bold;'>IT (KS Tin hoc)</td>";
                    strHTML += "\n<td style='background-color:#FFFF00;'>&nbsp;</td>";
                    strHTML += "\n<td style='background-color:#FFFF00;'>&nbsp;</td>";
                    //Tong 3
                    strHTML += "\n<td colspan='3' style='font-family: tahoma;font-size: 12px;font-weight:bold;'>BA (QTKD)</td>";
                    strHTML += "\n<td colspan='5' style='font-family: tahoma;font-size: 12px;font-weight:bold;'>FI (Ke toan)</td>";
                    strHTML += "\n<td colspan='5' style='font-family: tahoma;font-size: 12px;font-weight:bold;'>FB (tai chinh - NH)</td>";
                    strHTML += "\n<td colspan='5' style='font-family: tahoma;font-size: 12px;font-weight:bold;'>IT (KS Tin hoc)</td>";
                    strHTML += "\n<td style='background-color:#FFFF00;'>&nbsp;</td>";
                    strHTML += "\n</tr>";
                    #endregion
                    #region "Tieu de 3"
                    strHTML += "\n<tr>";
                    strHTML += "\n<td style='background-color:#800000;color:white;'>&nbsp;</td>";
                    //Tong 1
                    strHTML += "\n<td  width='20%' style='font-family: tahoma; font-size: 11px;font-weight:bold;'>VB2</td>";
                    strHTML += "\n<td style='font-family: tahoma; font-size: 11px;font-weight:bold;'>CĐ</td>";
                    strHTML += "\n<td style='font-family: tahoma; font-size: 11px;font-weight:bold;'>0+</td>";
                    //Ke toan
                    strHTML += "\n<td style='font-family: tahoma; font-size: 11px;font-weight:bold;'>VB2</td>";
                    strHTML += "\n<td style='font-family: tahoma; font-size: 11px;font-weight:bold;'>CĐ</td>";
                    strHTML += "\n<td style='font-family: tahoma; font-size: 11px;font-weight:bold;'>TC#</td>";
                    strHTML += "\n<td style='font-family: tahoma; font-size: 11px;font-weight:bold;'>TC</td>";
                    strHTML += "\n<td style='font-family: tahoma; font-size: 11px;font-weight:bold;'>0+</td>";
                    //TC-Ngan Hang
                    strHTML += "\n<td  style='font-family: tahoma; font-size: 11px;font-weight:bold;'>VB2</td>";
                    strHTML += "\n<td  style='font-family: tahoma; font-size: 11px;font-weight:bold;'>CĐ</td>";
                    strHTML += "\n<td  style='font-family: tahoma; font-size: 11px;font-weight:bold;'>TC#</td>";
                    strHTML += "\n<td  style='font-family: tahoma; font-size: 11px;font-weight:bold;'>TC</td>";
                    strHTML += "\n<td  style='font-family: tahoma; font-size: 11px;font-weight:bold;'>0+</td>";
                    //IT
                    strHTML += "\n<td  style='font-family: tahoma; font-size: 11px;font-weight:bold;'>VB2</td>";
                    strHTML += "\n<td  style='font-family: tahoma; font-size: 11px;font-weight:bold;'>CĐ</td>";
                    strHTML += "\n<td  style='font-family: tahoma; font-size: 11px;font-weight:bold;'>TC</td>";
                    strHTML += "\n<td  style='font-family: tahoma; font-size: 11px;font-weight:bold;'>DIP</td>";
                    strHTML += "\n<td  style='font-family: tahoma; font-size: 11px;font-weight:bold;'>0+</td>";
                    strHTML += "\n<td style='background-color:#FFFF00;'>&nbsp;</td>";
                    strHTML += "\n<td style='background-color:#FFFF00;'>&nbsp;</td>";

                    //Tong 2
                    strHTML += "\n<td  style='font-family: tahoma; font-size: 11px;font-weight:bold;'>VB2</td>";
                    strHTML += "\n<td  style='font-family: tahoma; font-size: 11px;font-weight:bold;'>CĐ</td>";
                    strHTML += "\n<td  style='font-family: tahoma; font-size: 11px;font-weight:bold;'>0+</td>";
                    //Ke toan
                    strHTML += "\n<td  style='font-family: tahoma; font-size: 11px;font-weight:bold;'>VB2</td>";
                    strHTML += "\n<td  style='font-family: tahoma; font-size: 11px;font-weight:bold;'>CĐ</td>";
                    strHTML += "\n<td  style='font-family: tahoma; font-size: 11px;font-weight:bold;'>TC#</td>";
                    strHTML += "\n<td  style='font-family: tahoma; font-size: 11px;font-weight:bold;'>TC</td>";
                    strHTML += "\n<td  style='font-family: tahoma; font-size: 11px;font-weight:bold;'>0+</td>";
                    //TC-Ngan Hang
                    strHTML += "\n<td  style='font-family: tahoma; font-size: 11px;font-weight:bold;'>VB2</td>";
                    strHTML += "\n<td  style='font-family: tahoma; font-size: 11px;font-weight:bold;'>CĐ</td>";
                    strHTML += "\n<td  style='font-family: tahoma; font-size: 11px;font-weight:bold;'>TC#</td>";
                    strHTML += "\n<td  style='font-family: tahoma; font-size: 11px;font-weight:bold;'>TC</td>";
                    strHTML += "\n<td  style='font-family: tahoma; font-size: 11px;font-weight:bold;'>0+</td>";
                    //IT
                    strHTML += "\n<td  style='font-family: tahoma; font-size: 11px;font-weight:bold;'>VB2</td>";
                    strHTML += "\n<td  style='font-family: tahoma; font-size: 11px;font-weight:bold;'>CĐ</td>";
                    strHTML += "\n<td  style='font-family: tahoma; font-size: 11px;font-weight:bold;'>TC</td>";
                    strHTML += "\n<td  style='font-family: tahoma; font-size: 11px;font-weight:bold;'>DIP</td>";
                    strHTML += "\n<td  style='font-family: tahoma; font-size: 11px;font-weight:bold;'>0+</td>";
                    strHTML += "\n<td style='background-color:#FFFF00;'>&nbsp;</td>";
                    strHTML += "\n<td style='background-color:#FFFF00;'>&nbsp;</td>";
                    //Tong 3
                    strHTML += "\n<td  style='font-family: tahoma; font-size: 11px;font-weight:bold;'>VB2</td>";
                    strHTML += "\n<td  style='font-family: tahoma; font-size: 11px;font-weight:bold;'>CĐ</td>";
                    strHTML += "\n<td  style='font-family: tahoma; font-size: 11px;font-weight:bold;'>0+</td>";

                    strHTML += "\n<td  style='font-family: tahoma; font-size: 11px;font-weight:bold;'>VB2</td>";
                    strHTML += "\n<td  style='font-family: tahoma; font-size: 11px;font-weight:bold;'>CĐ</td>";
                    strHTML += "\n<td  style='font-family: tahoma; font-size: 11px;font-weight:bold;'>TC#</td>";
                    strHTML += "\n<td  style='font-family: tahoma; font-size: 11px;font-weight:bold;'>TC</td>";
                    strHTML += "\n<td  style='font-family: tahoma; font-size: 11px;font-weight:bold;'>0+</td>";

                    strHTML += "\n<td  style='font-family: tahoma; font-size: 11px;font-weight:bold;'>VB2</td>";
                    strHTML += "\n<td  style='font-family: tahoma; font-size: 11px;font-weight:bold;'>CĐ</td>";
                    strHTML += "\n<td  style='font-family: tahoma; font-size: 11px;font-weight:bold;'>TC#</td>";
                    strHTML += "\n<td  style='font-family: tahoma; font-size: 11px;font-weight:bold;'>TC</td>";
                    strHTML += "\n<td  style='font-family: tahoma; font-size: 11px;font-weight:bold;'>0+</td>";

                    //IT
                    strHTML += "\n<td  style='font-family: tahoma; font-size: 11px;font-weight:bold;'>VB2</td>";
                    strHTML += "\n<td  style='font-family: tahoma; font-size: 11px;font-weight:bold;'>CĐ</td>";
                    strHTML += "\n<td  style='font-family: tahoma; font-size: 11px;font-weight:bold;'>TC</td>";
                    strHTML += "\n<td  style='font-family: tahoma; font-size: 11px;font-weight:bold;'>DIP</td>";
                    strHTML += "\n<td  style='font-family: tahoma; font-size: 11px;font-weight:bold;'>0+</td>";
                    strHTML += "\n<td style='background-color:#FFFF00;'>&nbsp;</td>";
                    strHTML += "\n</tr>";
                    #endregion
                    loadLevelReportExport(ref strHTML);
                    strHTML += "\n</table>";
                    ltrTable.Text = strHTML;
                }
                else
                {
                    strHTML  = "<table border='1' cellpadding='0' cellspacing='0' align='left' style='width:100%;'>";
                    #region "Tieu de"
                    strHTML += "\n<tr>";
                    strHTML += "\n<td style='background-color:#800000;color:white;'> &nbsp;</td>";
                    //Tong 1
                    strHTML += "\n<td colspan='18' style='background-color:#C0C0C0;' style='font-family: tahoma;font-size: 12px;font-weight:bold;'>Còn tồn từ trước</td>";
                    strHTML += "\n<td style='font-family: tahoma;font-size: 12px;font-weight:bold;'>Tổng</td>";
                    strHTML += "\n<td style='font-family: tahoma;font-size: 12px;font-weight:bold;'>%</td>";
                    //Tong 2
                    strHTML += "\n<td colspan='18' style='background-color:#C0C0C0;font-family: tahoma;font-size: 12px;font-weight:bold;' >Số lượng thi đợt này</td>";
                    strHTML += "\n<td style='font-family: tahoma;font-size: 12px;font-weight:bold;'>Tổng</td>";
                    strHTML += "\n<td style='font-family: tahoma;font-size: 12px;font-weight:bold;'>%</td>";
                    //Tong 3
                    strHTML += "\n<td colspan='18' style='background-color:#C0C0C0;font-family: tahoma;font-size: 12px;font-weight:bold;' >Số liệu khai giảng</td>";
                    strHTML += "\n<td  style='font-family: tahoma;font-size: 12px;font-weight:bold;' >Tổng</td>";
                    strHTML += "\n</tr>";
                    #endregion
                    #region "Tieu de 2"
                    strHTML += "\n<tr>";
                    strHTML += "\n<td style='background-color:#800000;color:white;'>&nbsp;</td>";
                    //Tong 1
                    strHTML += "\n<td colspan='3' style='font-family: tahoma; font-size: 11px;font-weight:bold;'>BA (QTKD)</td>";
                    strHTML += "\n<td colspan='5' style='font-family: tahoma; font-size: 11px;font-weight:bold;'>FI (Ke toan)</td>";
                    strHTML += "\n<td colspan='5' style='font-family: tahoma; font-size: 11px;font-weight:bold;'>FB (tai chinh - NH)</td>";
                    strHTML += "\n<td colspan='5' style='font-family: tahoma; font-size: 11px;font-weight:bold;'>IT (KS Tin hoc)</td>";
                    strHTML += "\n<td style='background-color:#FFFF00;'>&nbsp;</td>";
                    strHTML += "\n<td style='background-color:#FFFF00;'>&nbsp;</td>";
                    //Tong 2
                    strHTML += "\n<td colspan='3' style='font-family: tahoma; font-size: 11px;font-weight:bold;'>BA (QTKD)</td>";
                    strHTML += "\n<td colspan='5' style='font-family: tahoma; font-size: 11px;font-weight:bold;'>FI (Ke toan)</td>";
                    strHTML += "\n<td colspan='5' style='font-family: tahoma; font-size: 11px;font-weight:bold;'>FB (tai chinh - NH)</td>";
                    strHTML += "\n<td colspan='5' style='font-family: tahoma; font-size: 11px;font-weight:bold;'>IT (KS Tin hoc)</td>";
                    strHTML += "\n<td style='background-color:#FFFF00;'>&nbsp;</td>";
                    strHTML += "\n<td style='background-color:#FFFF00;'>&nbsp;</td>";
                    //Tong 3
                    strHTML += "\n<td colspan='3' style='font-family: tahoma; font-size: 11px;font-weight:bold;'>BA (QTKD)</td>";
                    strHTML += "\n<td colspan='5' style='font-family: tahoma; font-size: 11px;font-weight:bold;'>FI (Ke toan)</td>";
                    strHTML += "\n<td colspan='5' style='font-family: tahoma; font-size: 11px;font-weight:bold;'>FB (tai chinh - NH)</td>";
                    strHTML += "\n<td colspan='5' style='font-family: tahoma; font-size: 11px;font-weight:bold;'>IT (KS Tin hoc)</td>";
                    strHTML += "\n<td style='background-color:#FFFF00;'>&nbsp;</td>";
                    strHTML += "\n</tr>";
                    #endregion
                    #region "Tieu de 3"
                    strHTML += "\n<tr>";
                    strHTML += "\n<td style='background-color:#800000;color:white;'>&nbsp;</td>";
                    //Tong 1
                    strHTML += "\n<td  width='20%'style='font-family: tahoma; font-size: 11px;font-weight:bold;'>VB2</td>";
                    strHTML += "\n<td style='font-family: tahoma; font-size: 11px;font-weight:bold;'>CĐ</td>";
                    strHTML += "\n<td style='font-family: tahoma; font-size: 11px;font-weight:bold;'>0+</td>";
                    //Ke toan
                    strHTML += "\n<td style='font-family: tahoma; font-size: 11px;font-weight:bold;'>VB2</td>";
                    strHTML += "\n<td style='font-family: tahoma; font-size: 11px;font-weight:bold;'>CĐ</td>";
                    strHTML += "\n<td style='font-family: tahoma; font-size: 11px;font-weight:bold;'>TC#</td>";
                    strHTML += "\n<td style='font-family: tahoma; font-size: 11px;font-weight:bold;'>TC</td>";
                    strHTML += "\n<td style='font-family: tahoma; font-size: 11px;font-weight:bold;'>0+</td>";
                    //TC-Ngan Hang
                    strHTML += "\n<td style='font-family: tahoma; font-size: 11px;font-weight:bold;'>VB2</td>";
                    strHTML += "\n<td style='font-family: tahoma; font-size: 11px;font-weight:bold;'>CĐ</td>";
                    strHTML += "\n<td style='font-family: tahoma; font-size: 11px;font-weight:bold;'>TC#</td>";
                    strHTML += "\n<td style='font-family: tahoma; font-size: 11px;font-weight:bold;'>TC</td>";
                    strHTML += "\n<td style='font-family: tahoma; font-size: 11px;font-weight:bold;'>0+</td>";
                    //IT
                    strHTML += "\n<td style='font-family: tahoma; font-size: 11px;font-weight:bold;'>VB2</td>";
                    strHTML += "\n<td style='font-family: tahoma; font-size: 11px;font-weight:bold;'>CĐ</td>";
                    strHTML += "\n<td style='font-family: tahoma; font-size: 11px;font-weight:bold;'>TC</td>";
                    strHTML += "\n<td style='font-family: tahoma; font-size: 11px;font-weight:bold;'>DIP</td>";
                    strHTML += "\n<td style='font-family: tahoma; font-size: 11px;font-weight:bold;'>0+</td>";
                    strHTML += "\n<td style='background-color:#FFFF00;'>&nbsp;</td>";
                    strHTML += "\n<td style='background-color:#FFFF00;'>&nbsp;</td>";

                    //Tong 2
                    strHTML += "\n<td style='font-family: tahoma; font-size: 11px;font-weight:bold;'>VB2</td>";
                    strHTML += "\n<td style='font-family: tahoma; font-size: 11px;font-weight:bold;'>CĐ</td>";
                    strHTML += "\n<td style='font-family: tahoma; font-size: 11px;font-weight:bold;'>0+</td>";
                    //Ke toan
                    strHTML += "\n<td style='font-family: tahoma; font-size: 11px;font-weight:bold;'>VB2</td>";
                    strHTML += "\n<td style='font-family: tahoma; font-size: 11px;font-weight:bold;'>CĐ</td>";
                    strHTML += "\n<td style='font-family: tahoma; font-size: 11px;font-weight:bold;'>TC#</td>";
                    strHTML += "\n<td style='font-family: tahoma; font-size: 11px;font-weight:bold;'>TC</td>";
                    strHTML += "\n<td style='font-family: tahoma; font-size: 11px;font-weight:bold;'>0+</td>";
                    //TC-Ngan Hang
                    strHTML += "\n<td style='font-family: tahoma; font-size: 11px;font-weight:bold;'>VB2</td>";
                    strHTML += "\n<td style='font-family: tahoma; font-size: 11px;font-weight:bold;'>CĐ</td>";
                    strHTML += "\n<td style='font-family: tahoma; font-size: 11px;font-weight:bold;'>TC#</td>";
                    strHTML += "\n<td style='font-family: tahoma; font-size: 11px;font-weight:bold;'>TC</td>";
                    strHTML += "\n<td style='font-family: tahoma; font-size: 11px;font-weight:bold;'>0+</td>";
                    //IT
                    strHTML += "\n<td style='font-family: tahoma; font-size: 11px;font-weight:bold;'>VB2</td>";
                    strHTML += "\n<td style='font-family: tahoma; font-size: 11px;font-weight:bold;'>CĐ</td>";
                    strHTML += "\n<td style='font-family: tahoma; font-size: 11px;font-weight:bold;'>TC</td>";
                    strHTML += "\n<td style='font-family: tahoma; font-size: 11px;font-weight:bold;'>DIP</td>";
                    strHTML += "\n<td style='font-family: tahoma; font-size: 11px;font-weight:bold;'>0+</td>";
                    strHTML += "\n<td style='background-color:#FFFF00;'>&nbsp;</td>";
                    strHTML += "\n<td style='background-color:#FFFF00;'>&nbsp;</td>";
                    //Tong 3
                    strHTML += "\n<td style='font-family: tahoma; font-size: 11px;font-weight:bold;'>VB2</td>";
                    strHTML += "\n<td style='font-family: tahoma; font-size: 11px;font-weight:bold;'>CĐ</td>";
                    strHTML += "\n<td style='font-family: tahoma; font-size: 11px;font-weight:bold;'>0+</td>";

                    strHTML += "\n<td style='font-family: tahoma; font-size: 11px;font-weight:bold;'>VB2</td>";
                    strHTML += "\n<td style='font-family: tahoma; font-size: 11px;font-weight:bold;'>CĐ</td>";
                    strHTML += "\n<td style='font-family: tahoma; font-size: 11px;font-weight:bold;'>TC#</td>";
                    strHTML += "\n<td style='font-family: tahoma; font-size: 11px;font-weight:bold;'>TC</td>";
                    strHTML += "\n<td style='font-family: tahoma; font-size: 11px;font-weight:bold;'>0+</td>";

                    strHTML += "\n<td style='font-family: tahoma; font-size: 11px;font-weight:bold;'>VB2</td>";
                    strHTML += "\n<td style='font-family: tahoma; font-size: 11px;font-weight:bold;'>CĐ</td>";
                    strHTML += "\n<td style='font-family: tahoma; font-size: 11px;font-weight:bold;'>TC#</td>";
                    strHTML += "\n<td style='font-family: tahoma; font-size: 11px;font-weight:bold;'>TC</td>";
                    strHTML += "\n<td style='font-family: tahoma; font-size: 11px;font-weight:bold;'>0+</td>";

                    //IT
                    strHTML += "\n<td style='font-family: tahoma; font-size: 11px;font-weight:bold;'>VB2</td>";
                    strHTML += "\n<td style='font-family: tahoma; font-size: 11px;font-weight:bold;'>CĐ</td>";
                    strHTML += "\n<td style='font-family: tahoma; font-size: 11px;font-weight:bold;'>TC</td>";
                    strHTML += "\n<td style='font-family: tahoma; font-size: 11px;font-weight:bold;'>DIP</td>";
                    strHTML += "\n<td style='font-family: tahoma; font-size: 11px;font-weight:bold;'>0+</td>";
                    strHTML += "\n<td style='background-color:#FFFF00;'>&nbsp;</td>";
                    strHTML += "\n</tr>";
                    #endregion
                    loadLevelReport(ref strHTML);
                    strHTML += "\n</table>";
                    ltrTable.Text = strHTML;
                }
                strHTML += "\n </body> ";
                strHTML += "\n </html> ";

                return strHTML;
            }
            catch
            {
                return "";
            }
        }
        #endregion
    #endregion
        #region "Events handle"
        private void loadDataAccess()
        {
            SqlConnection sqlConnec = ConnectData.getConnection();
            objHocVienLV2 = new DAHocVienLV2(sqlConnec);
            objHocVienLV3LV5 = new DAHocVienLV3LV5(sqlConnec);
            objHocVienLV6LV8 = new DAHocVienLV6LV8(sqlConnec);
            objHocVien = new DAHocVien(sqlConnec);
            objNguoidung = new DANguoidung(sqlConnec);
            objTrangThaiGoi = new DATrangThaiGoi(sqlConnec);
            objTrangThai = new DATrangThai(sqlConnec);
            objLevel = new DALevel(sqlConnec);
            objQuyen = new DAQuyen(sqlConnec);
            objReport = new DAReport(sqlConnec);
            intTrangThaiGoi1 = Convert.ToInt32(System.Configuration.ConfigurationManager.AppSettings["TrangThai1"].ToString());
            intTrangThaiGoi2 = System.Configuration.ConfigurationManager.AppSettings["TrangThai2"].ToString();
            intTrangThaiGoi3 = Convert.ToInt32(System.Configuration.ConfigurationManager.AppSettings["TrangThai3"].ToString());
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            loadDataAccess();
            if (!Page.IsPostBack)
            {
                loadHistoryDate();
                this.btnSave.Visible = false;
            }
        }
        //Bao cao
        protected void btnReport4s_Click(object sender, EventArgs e)
        {
            this.btnSave.Visible = true;
            loadReport4s();
        }
        protected void btnSave_Click(object sender, EventArgs e)
        {
            InsertReport4s();
            loadReport4s();
        }
        protected void btnExportFile_Click(object sender, EventArgs e)
        {
            SaveExcel(loadExportReport4s(), "BaocaotonghopS4" + DateTime.Now.Day + "-" + DateTime.Now.Month + "-" + DateTime.Now.Year + ".xls");  
        }

        #endregion
}